|
2 | 2 |
|
3 | 3 | ``` |
4 | 4 | This review covers: |
5 | | -• some commands thought by Unmesh in class today |
6 | 5 | • Intro JavaScript (What is it, where can you use it for) |
7 | 6 | • Variables [var, let, const] |
8 | 7 | • Basic Data types [Strings, Numbers, Arrays] |
9 | 8 | • Operators |
10 | 9 | ``` |
11 | 10 |
|
12 | | -## CLI |
13 | | -``` |
14 | | -pwd : present working directory |
15 | | -ls : List files in the directory |
16 | | -cd : change the directory |
17 | | -touch: Create an empty file |
18 | | -echo : display the string |
19 | | -echo -n : Display the string without newline |
20 | | -echo “something” > file : Redirect the output of echo and create file |
21 | | -echo “another thing” >> file : Append the string to the file |
22 | | -mkdir: make a new directory |
23 | | -cd ~ : home |
24 | | -cd - : previous directory |
25 | | -cd .. : parent directory |
26 | | -ls -a : List all files including hidden files |
27 | | -cd / : change to the root directory |
28 | | -cat : Concatenate the file line by line and display it on the terminal |
29 | | -less: Print the big file line by line |
30 | | -vim <file> : open the editor with <file> {a: to go to the insert mode, <ESC>:wq to write and quit } |
31 | | -for var in {START..END}; do <COMMAND1>; <COMMAND2>;..; ; done |
32 | | -head <file>: display the first 10 lines of file |
33 | | -tail <file>: display the last 10 lines of file |
34 | | -head -n <file> : display first n lines of file |
35 | | -tail -n <file> : display last n lines of file |
36 | | -man <COMMAND> : Display manual of the COMMAND |
37 | | -``` |
38 | | - |
39 | | -:star: Highly recommended :star: :take a look at the Command Line [repository](https://github.com/HackYourFuture/CommandLine) and especially review the preparations of the first lecture: https://github.com/HackYourFuture/CommandLine/blob/master/Lecture-1.md |
40 | | - |
41 | 11 | ## Variables |
42 | 12 |
|
43 | 13 | A "variable" is a place where you can store information, such as a string, or a number. New variables in JavaScript are declared using one of three keywords: let, const, or var. |
|
0 commit comments