git branch --merged | grep -v \* | xargs
git branch --merged | grep -v \* | xargs git branch -D
const restaurant = { | |
name: 'Classico Italiano', | |
location: 'Via Angelo Tavanti 23, Firenze, Italy', | |
categories: ['Italian', 'Pizzeria', 'Vegetarian', 'Organic'], | |
starterMenu: ['Focaccia', 'Bruschetta', 'Garlic Bread', 'Caprese Salad'], | |
mainMenu: ['Pizza', 'Pasta', 'Risotto'], | |
openingHours: { | |
thu: { | |
open: 12, | |
close: 22, |
================================================= Destructuring Arrays ================================================= | |
Declare multiple variables at the same time on the left side > const arr = [1, 2, 3]; | |
> const [a, b, c] = arr; | |
> console.log({a}, {b}, {c}); | |
{a: 1} {b: 2} {c: 3} | |
const restaurant = { | |
name: 'Classico Italiano', | |
location: 'Via Angelo Tavanti 23, Firenze, Italy', |
==> Can use imperative or declarative paradigms and is very flexible. | |
==> First-class functions (treat functions as variables, passing a function into another function); | |
powerful; allows for functional programming. | |
==> Dyanmically-type language: no data type definitions, known at runtime and can be automatically changed | |
==> Concurrency model is JS handling multiple tasks at the same time. | |
==> Event Loops manage the Single-Thread (executed one task at a time) by taking long running tasks, | |
executing them in the background, then placing them back in the thread when finished. The Event Loop | |
prevent non-blocking behavior | |
===== Document Object Model (DOM) Manipulation & Event Fundamentals ==== | |
Structured representation of the HTML document that allows JS to access and select elements and | |
styles to manipulate them (i.e. change text, HTML attributes and CSS styles). Automatically created | |
once browser loads HTML and stored in a tree structure with nodes. Not JS, but rather apart of web | |
api's and interact with JS. | |
Document object is the entry-point into DOM | |
.querySelector('.message') |
==================================== Hyper Text Markup Language (HTML) =============================== | |
==> Opening and Closing Tags | |
each tag typically comes with a paired ending tag that begins with a forward-slash | |
<tag_example></tag_example> | |
some tags are self closing and will only have one tag which does or does not ends with a forward-slash | |
<tag_example/> | |
<tag_element> |
==> TOOLS | |
console.warn() | |
console.error() | |
console.table() ==> formatted table with index and value | |
'use strict'; ==> opts out of silen errors for scripts | |
Google Chrome breakpoint settings ==> click the line number to pause execution at that point and | |
observe scope tab to determine what is occuring at the breakpoint | |
==> COMMON ISSUES |
============================================================================================================================== | |
ARRAY METHODS | |
============================================================================================================================== | |
const family = ['Malaika', 'Jahdai']; | |
arr.push() | |
==> add to end of array > family.push('Daaimah'); | |
==> mutates length > console.log(family); | |
==> return length of new array ['Malaika', 'Jahdai', 'Daaimah'] |
# myName.txt (filename1) | |
# 1. My name is Daaimah Tibrey! | |
# 2. | |
# 3. | |
# myFormerName.txt (filename2) | |
# 1. My previous name was Daaimah Brown. | |
# myName.py (filename3) | |
from sys import argv |