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.
CSS
- There are 3 ways to style a HTML using CSS: inline CSS, internal CSS style sheet and external CSS style sheet.
- We use CSS to define style rules for specific elements of HTML.
- External CSS style sheet is popular among developers, as it allows to keep the CSS.
- Separation of concerns, refers to the separation of code into different files based on use.
- Do not Repeat Yourself (DRY), encourages to reuse and share pieces of code.
- Assigning colors in CSS canbe done by using semantic references or hex #.
Git
- git status: checks what branch we are currently on
- git checkout -b branch-name: creates a new brach and switches to it
- git add -A: stage and add all changes
- git commit -m: to commit changes
- git pull origin main: double check we're in sync with the main branch
- git push origin branch-name: to push changes to the remote branch
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.
- An array is a single variable that allows to hold a group of data.
- A function is a set of instructions that tells the computer what to do.
- for loops and conditional statements execute automatically when the .js file is run.
- Functions need to be called by name in order to execute them.