From 64a5664f3840572ab548d930ca53a5bc72c2e6ca Mon Sep 17 00:00:00 2001 From: Remi Marcelle Date: Sat, 24 May 2025 15:28:25 +0100 Subject: [PATCH] Fix answers in homework.md --- homework.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/homework.md b/homework.md index f7a8449a..88a07506 100644 --- a/homework.md +++ b/homework.md @@ -2,24 +2,34 @@ ## 1. What is 2 + 2? -5 +4 ## 2. What is JavaScript? -An exciting new play about coffee. +Javascript is a high level programming language that enables interactivity and effects the behaviour of web applications dynamically. It can update both HTML and CSS. Js can also calculate, manipulate and validate data. It runs in the browser and allows developers to manipulate the Document Object Model (DOM), responder to user events, make network requests and dynamically update the UI without requiring page reload. Beyond the browser, JavaScript can also run on servers using environments like Node.js, and it's the foundation for modern frameworks and libraries such as React, Vue, and Angular. Along with HTML and CSS, it is what enables front end development today. + +Use cases +- pop ups +- showing or hiding elements when a user clicks/hovers over a button/picture +- validating for input before it's submitted +- fetching and displaying live data from API (the weather, stock prices) +- creating single page applications with frameworks like React +- handling server logic, databases and routing with Node.js ## 3. What three problems does Git & GitHub solve? -When people want to show off code to each other they can put it on GitHub +1. git & github enables collaborators to work together on a project in real time due to being able to see what other developers have gone. Through the use of merges and branches +2. Git tracks files over time and developers can go back to previous versions of their work if they have made a mistake +3. a remote place to store code, review changes, open issues (pull requests) and manage project contributions with tools like version control history ## 4. What happens when you `fork` a repository? +Forking a repo creates a copy of another developer's project using my own GitHub account. This lets me make changes/contribute without effecting the original code. -You delete it ## 5. What happens when you clone a repository? -It send it to a friend +Cloning downloads a complete copy of a github repo to my local computer, includes history, branches and files. This means I can use Git locally to track my work and then I can push the changes to the remote repo located on github. ## 6. What is a Pull Request? -When you send a file over the internet +A pull request is a way of proposing changes to a codebase. Say I submit changes into a new branch, away from the main. Someone else can then review my code and choose whether to add comments, test the code or merge it into the main branch. Pull requests enable a collaborative environment and quality control.