10000 readme and cheat-sheet · muses-code-js/js-intro-workshop@8e86dc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e86dc7

Browse files
committed
readme and cheat-sheet
1 parent daf8058 commit 8e86dc7

File tree

2 files changed

+114
-1
lines changed

2 files changed

+114
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
# js-intro-workshop
1+
# js-intro-workshop
2+
3+
An introductory JavaScript workshop for beginners.
4+
5+
**Structure**
6+
7+
- Css folder contains css files that are responsible for styles and how our project looks on the web.
8+
9+
- Js folder contains javaScript files that makes our project works, it defines content and make static page functional.
10+
It contains 2 files:
11+
- _level1.js_ - basics with explanations(comments, variables, functions, if/else statements). Level 1
12+
- _level2.js_ - more complex javaScript with explanations(arrays, loops, events). Level 2
13+
14+
- _index.html_ - a file that responsible for structure of our project.
15+
16+
- _Readme.md_ - a file with explanations and any information about the project, how to run it, what it is for etc.
17+
18+
- _cheat-sheet.md_ - file with quick overlook for key namings and their explanations.

cheat-sheet.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# JavaScript Cheatsheet
2+
3+
4+
**JavaScript (or JS)**
5+
It is a popular programming language commonly used to create interactive effects within web browsers
6+
7+
8+
**variable**
9+
A place to store values, can store any kind of information(data types): numbers, words, collections of data
10+
11+
12+
**undefined variable**
13+
A variable that has no value
14+
15+
**to declare variable**
16+
To create a variable - done by using ‘ var variable-name = value ’
17+
18+
19+
**to initialize variable**
20+
Set (give) some value to variable.
21+
22+
**string**
23+
A set of characters, word, phrase. To initialize variable wit 10000 h a string you need to put this string into quotes.
24+
25+
**boolean**
26+
Boolean variable represent a logical values True or False
27+
28+
29+
**array**
30+
An ordered list of values, can store different type of data inside
31+
32+
33+
**operator**
34+
Mathematical operators, such as: +, -, *, /, >, <, = etc
35+
36+
37+
**comments**
38+
Comments are some notes that you can leave for yourself or another person, the note that 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
39+
Single line comment starts with //
40+
Multi line comment are placed between /* .. */
41+
42+
43+
**function**
44+
A separable, reusable piece of code. It takes some input do some manipulation on it and return us output
45+
46+
47+
**to declare function**
48+
To create a function
49+
50+
**argument**
51+
A value input that functions can accept
52+
53+
54+
**if/else statement**
55+
‘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”};
56+
57+
58+
**while loop**
59+
It repeats code over and over again until some condition is met
60+
61+
62+
**for loop**
63+
This loop is similar to ‘while loop’, just with set amount of repetition. You declare counter in the statement as so: for(var i = 0; i < 5; i++){do something 5 times};
64+
65+
66+
**infinite loop**
67+
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.
68+
69+
70+
**object**
71+
A collection of properties
72+
73+
74+
**event**
75+
A type of object that is created when user interacts with web page. For example, JavaScript creates an event when user clicks on a button.
76+
77+
78+
**CSS**
79+
Stands for Cascading Style Sheets. CSS describes how HTML elements are to be displayed on screen. It is presentation.
80+
81+
82+
**HTML**
83+
Stands for Hyper Text Markup Language. It is a structure of the elements on the page.
84+
85+
86+
**DOM**
87+
Stands for Document Object Model. It defines the logical structure of documents and the way a document is accessed and manipulated.
88+
89+
90+
**scope**
91+
Scope is the set of variables, objects, and functions that you can access
92+
93+
94+
**console**
95+
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.
96+

0 commit comments

Comments
 (0)
0