function
function myFunction(parameters) {
// code to run when function is called
}
let myFunction = function () {
// code to run when function is called
}
()
myFunction() // calls myFunction
for (initial value; condition to evaluate; increment) {
//code to be executed
}
while (condition that MUST evaluate to true) {
// code to be executed
}
Command | Meaning | Action |
---|---|---|
pwd |
Print Working Directory | Tells you current PATH |
cd |
Change Directory | Moves to specified directory |
mkdir |
Make Directory | Makes new directory in specified location |
touch |
Create File | Makes a new file in specified location |
ls |
List Contents | List visible contents in a directory |
ls -a |
List All Contents | List all contents in a directory |
ls -l |
List Contents, Long List | Lists contents in a directory as a list, top to bottom |