Skip to content

Commit 603aff9

Browse files
NoognButenkoT
authored andcommitted
Markdown formatting (#7)
* Fixed heading formatting so it displays correctly in Github, added 2nd level headings, improved formatting for code blocks * Removed horizontal lines since it doubles up in Github formatting, added Iterating/Loops heading
1 parent 000564c commit 603aff9

File tree

2 files changed

+62
-39
lines changed

2 files changed

+62
-39
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22

33
An introductory JavaScript workshop for beginners.
44

5-
##Slides
5+
## Slides
66

77
Check on slides, click [here](https://slides.com/tanyabutenko/ngs-intro/)
88

99

10-
##Feedback
10+
## Feedback
1111

1212
To leave feedback click [here](https://goo.gl/forms/MxDr9q2A4PQV4CRI3)
1313

1414

15-
##How to use
16-
_______________
17-
18-
15+
## How to use
1916

2017
If you are familiar with git, you can clone this repository to your machine and simply start working
2118
through files starting from README.md file, after that jump to js/level1.js file.
@@ -33,9 +30,7 @@ Follow the instructions in _level1.js_ file and type code in your Text Editor (i
3330

3431

3532

36-
##Structure
37-
____________________
38-
33+
## Structure
3934

4035
- CSS folder - contains css files that are responsible for styles and how our project looks on the web.
4136

cheat-sheet.md

Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,147 @@
11
# JavaScript Cheatsheet
22

33

4-
###JavaScript (or JS)
4+
## JavaScript (or JS)
55

66
It is a popular programming language commonly used to create interactive effects within web browsers.
77

88

9-
###variable
9+
## variable
1010

1111
A place to store values, can store any kind of information (data types): numbers, words, collections of data
1212

1313

14-
###undefined variable
14+
### undefined variable
1515

1616
A variable that has no value
1717

18-
###to declare variable
18+
### to declare variable
1919

20-
To create a variable - done by using ‘ var variable-name = value ’
20+
To create a variable - done by using:
2121

22+
```
23+
var variableName = value;
24+
```
2225

23-
###to initialize variable
26+
27+
### to initialize variable
2428

2529
Set (give) some value to variable.
2630

27-
###string
31+
## value types
32+
33+
### string
2834

2935
A set of characters, word(s), phrase. To initialize variable with a string you need to put this string into quotes.
3036

31-
###boolean
37+
### boolean
3238

3339
Boolean variable represent a logical value True or False
3440

3541

36-
###array
42+
### array
3743

3844
An ordered list of values, can store different types of data inside
3945

4046

41-
###operator
47+
### operator
4248

4349
Mathematical operators, such as: +, -, *, /, >, <, = etc
4450

4551

46-
###comments
52+
## comments
53+
54+
Comments are some notes that you can leave for yourself or another person, a note that a computer will not read. You can write a comment on a new line or on the same line after code as so:
4755

48-
Comments are some notes that you can leave for yourself or another person, a note that a computer will not read. You can write a comment on a new line or on the same line after code as so: //I’m your comment
49-
Single line comment starts with //
50-
Multi line comment are placed between /* .. */
56+
```
57+
// I’m your comment
58+
```
59+
Single line comment starts with `//`
60+
Multi line comment are placed between `/* .. */`
5161

5262

53-
###function
63+
## function
5464

5565
A separable, reusable piece of code. It takes some input, does some manipulation on it and returns us an output.
5666

5767

58-
###to declare function
68+
### to declare function
5969

6070
To create a function
6171

62-
###argument
72+
### argument
6373

6474
A value input that functions can accept
6575

6676

67-
###if/else statement
77+
## if/else statement
6878

69-
‘If’ used to decide which lines of code to execute, else - to give alternative set of instructions. Example: if(x > 5) {console.log”X bigger than 5”}; else {console.log”X smaller than 5”};
79+
`if` used to decide which lines of code to execute, `else` - to give alternative set of instructions.
7080

81+
Example:
7182

72-
###while loop
83+
```
84+
if (x > 5) {
85+
console.log("X bigger than 5");
86+
}
87+
else {
88+
console.log("X smaller than 5");
89+
}
90+
```
91+
92+
## Iterating/Loops
93+
94+
### while loop
7395

7496
It repeats code over and over again until some condition is met.
7597

7698

77-
###for loop
99+
### for loop
100+
101+
This loop is similar to ‘while loop’, just with a set amount of repetition. You declare counter in the statement as so:
78102

79-
This loop is similar to ‘while loop’, just with a set amount of repetition. You declare counter in the statement as so: for(var i = 0; i < 5; i++){do something 5 times};
103+
```
104+
for (var i = 0; i < 5; i++) {
105+
do something 5 times
106+
}
107+
```
80108

81109

82-
###infinite loop
110+
### infinite loop
83111

84112
A loop that does not stop and it’s a loop that you need to avoid. Each loop should have some condition so it can stop.
85113

86114

87-
###object
115+
## object
88116

89117
A collection of properties
90118

91119

92-
###event
120+
## event
93121

94122
A type of object that is created when a user interacts with a web page. For example, JavaScript creates an event when a user clicks on a button.
95123

96124

97-
###CSS
125+
## CSS
98126

99127
Stands for Cascading Style Sheets. CSS describes how HTML elements are to be displayed on screen. It is presentation.
100128

101129

102-
###HTML
130+
## HTML
103131

104132
Stands for Hyper Text Markup Language. It is a structure of the elements on the page.
105133

106134

107-
###DOM
135+
## DOM
108136

109137
Stands for Document Object Model. It defines the logical structure of documents and the way a document is accessed and manipulated.
110138

111139

112-
###scope
140+
## scope
113141

114142
Scope is the set of variables, objects, and functions that you can access.
115143

116144

117-
###console
145+
## console
118146

119147
A method of interacting with the system. In order to write to the browser console, you could use console.log(‘Hello World’). This would write Hello World in the browser console.

0 commit comments

Comments
 (0)