Prework Study Guide
✨ Open the Console to See What's Happening ✨
HTML
- The head element contains information about the webpage.
- The body element represents the visible content shown to the user.
- The DOCTYPE declaration tells the browser what type of file it is working with.
- HTML elements usually consist of opening and closing tags, and any content in between.
- HTML tags are represented with angle brackets: <>.
- HTML attributes appear in beginning tags and provide additional information about an element.
CSS
- A CSS rule consists of a selector, followed by a declaration block.
- More than one selector, separated by commas, can be used in a single rule.
- * is the wildcard selector that selects all elements.
- Classes of elements can be selected by prepending a period.
- Each declaration consists of a property and a value.
- A margin indicates how much space we want around the outside of an element.
- A padding indicates how much space we want around the content inside an element.
Git
- git status: checks which branch we are currently on
- git checkout -b branch-name: creates a new branch and switches to it
- git add -A: adds all changes to the staging area
- git commit -m "brief desription": commits staged files
- git pull origin main: brings in changes from the main branch of the remote repository
- git push origin branch-name: sends out changes to a branch of the remote repository
JavaScript
- A variable is a named container that allows us to store data in our code.
- Control flow is the order in which a computer executes code in a script.
- A conditional statement looks like this: if (/* condition */) {/* code */;}
- A for loop looks like this: for (/* index assignment */; /* condition */; /* increment */) {/* code */}
- A function definition looks like this: function() {/* code */;}
- = is the assignment operator, used to assign a value to a variable.
- == is the equality operator, which attempts to convert objects of different types before comparing.
- === is the strict equality operator, which considers operands of different types to be different.
- The Number data type uses floating point numbers, and can only reliably handle integers of magnitude less than +/- 2^53.
- The BigInt data type, whose members are written as numbers postpended by an 'n', can handle integers of arbitrary magnitude.