CLI: Command Line Interface
pwd: Print Current Working Directory
mkdir (folder name goes here)
cd ../
- Shifting your file to upside
cp -r aaa bbb
- Duplicating all the contents in aaa files to bbb
rm -rf (folder name goes here)
rm -rf .git
git add .
ls
ls -al
yarn dev
To upload the projects or to save it, the user must upload the project to git hub repository.
1. Go to terminal in vs code.
2. Type git init
--> Adding the new folder to git
3. Type ls - al
--> Making sure there whether .git file appeared.
4. If .git file exists, use rm -rf .git to remove.
5. type git status
--> Green code = saved.
--> Red code = not saved yet.
6. Type git add .
--> Store arbitrarily. (the file turns into green color)
7. Type git commit -m "title"
--> Saving permanent
8. Type git remote add origin
--> It doesn't have to be named origin, but usually developers use origin.
9. Type git remote -v
--> Checking whether the code is properly being operated.
10. Type git push origin master
--> Finally saves and uploads to git hub.
Regularly using CSS regarding html, the user initially declared via using division tag:
<div class="classname">Hello World</div>
.classname {
color: black;
}
However, when the user wants to use CSS inside javascript directly, basically he/she is using CSS-in-js:
<Password>Write Down Your Password</Password>
const Password = styled.div `
color: black;
`
--> Declare and use const and the name the user declared.
--> Const is having similar function alike using the name of class in CSS regarding HTML.
--> There requires backticks instead of curly brackets.
--> styled.div used.
#Problem Solving
Get the number of times the robot moved to the way up to 100th floor.
(The robot started moving from the 1st floor, and it can move 1-2 floors per one movement.)
let answer=0;
const limit=100;
for (let i =1; i<limit; i=i+2){
answer= answer+1
}
--> the variable i is decalred as 1 since the robot starts from 1st floor. (first floor = 1 = i)
--> Written i=i+2 since the robot is moving 2 stairs per one movement.
--> One loop of 2 moving 2 stairs, one movement added to answer.