Skip to content

Commit afcc2f9

Browse files
committed
titles formatted
1 parent 9cb622f commit afcc2f9

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

readMe.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![JS](https://cdn-images-1.medium.com/max/1600/1*H-25KB7EbSHjv70HXrdl6w.png)
44

5-
## Table of Contents
5+
# Table of Contents
66

77
1. [Introduction](#introduction)
88
2. [Setup](#setup)
@@ -29,7 +29,7 @@
2929
23. [JavaScript Interview Questions](#javascript-interview-questions)
3030

3131

32-
## Introduction
32+
# Introduction
3333
**_JavaScript for Everone_** is a guide for both beginner and advanced JavaScript developers. Welcome to JavaScript. **_Congratulations_** for deciding to learn JavaScript.
3434

3535
In this step by step tutorial, you will learn JavaScript, the most popular programming language in the history of mankind.
@@ -38,12 +38,12 @@ You use JavaScript **_to add interactivity to websites, to develop mobile apps,
3838
programming language for four consecutive years and is the most used programming language on
3939
Github.
4040

41-
## Setup
41+
# Setup
4242

4343
First thing first, lets install text or code editor. Install code editor, it could be [vscode](https://code.visualstudio.com/), [atom](https://atom.io/), [bracket](http://brackets.io/), [notepad++](https://notepad-plus-plus.org/) or others. I recommend vscode.
4444
Install either [Chrome](https://www.google.com/chrome/) or [Firefox](https://www.mozilla.org/en-US/firefox/new/?v=b) if you didn't have yet.
4545

46-
If you want help, you may join the [telegram](https://web.telegram.org/#/im?p=g393844817) channel.
46+
If you want help, you may join the [telegram](https://t.me/JavaScriptforEveryone) channel.
4747

4848
## Adding JavaScript to a web page
4949
JavaScript can be added to a web pages in three ways:
@@ -101,7 +101,7 @@ Internal script can be written in the _head_ or the _body_ but it is preferrable
101101

102102
#### Exercises:Setting Up your machine
103103

104-
## Variables
104+
# Variables
105105
Variables are _containers_ of data. Variables _store_ data in a memory location. When a variable is declared a memory location is reserved and when it is assigned to a value, the memory space will be filled. To declare a variable we use, _var_, _let_ or _const_ key word. For a variable which changes at different time we use _let_ but if the data doesn't change at all we use _const_. For example PI, country name, gravity.
106106
107107
Valid variables in JavaScript:
@@ -127,25 +127,23 @@ Valid variables in JavaScript:
127127
year_2019
128128
```
129129
130-
Camel case or the first way of declaring is conventional in JavaScript.
130+
Camel case or the first way of declaring is conventional in JavaScript. In this material, camelCase variables will be used.
131131
132132
Invalid variable:
133133
```js
134134
first-name
135135
1_num
136136
num_#_1
137137
```
138-
139-
140138
```js
141139
// Declaring different variables of different data types
142140
let firstName = "Asabeneh"; // first name of a person
143141
let lastName = "Yetayeh"; // last name of a person
144-
let location = "Helsinki"; // capital city
145-
const country = "Finland"; // country
142+
let country = "Finland"; // country
143+
let city = "Helsinki"; // capital city
146144
let age = 100; // age in years
147145
let isMarried = true;
148-
console.log(firstName, lastName, location, country, age); //Asabeneh, Yetayeh, Helsinki, Finland, 100
146+
console.log(firstName, lastName, country, city, age, isMarried); //Asabeneh, Yetayeh, Finland, Helsinki, 100, True
149147
150148
// Declaring variables with number values
151149
const gravity = 9.81; // earth gravity in m/s2
@@ -493,7 +491,7 @@ Which are true or which are false ?
493491
1. 4 == '4'
494492
1. 4 === '4'
495493

496-
## Conditionals
494+
# Conditionals
497495

498496
#### If
499497

@@ -638,11 +636,11 @@ isRaining
638636
- March, April or May, the season is Spring
639637
- June, July or August, the season is Summer
640638

641-
## Loops
639+
# Loops
642640

643641
In programming languages to carry out repetitive task we use different kinds of loop. The following examples are the commonly used loops.
644642

645-
### For Loop
643+
## For Loop
646644

647645
```js
648646
//For loop structure
@@ -655,7 +653,7 @@ for(let i = 0; i <= 5; i++){
655653

656654
```
657655

658-
### While loop
656+
## While loop
659657

660658
```js
661659
let i = 0;
@@ -665,7 +663,7 @@ while (i <= 5) {
665663
}
666664
```
667665

668-
### Do while loop
666+
## Do while loop
669667

670668
```js
671669
let i = 0;
@@ -701,7 +699,7 @@ do {
701699
The sum of all evens is 2550. And the sum of all odds is 2500.
702700
```
703701

704-
## Arrays
702+
# Arrays
705703

706704
In contrast to variables array can store _multiple values_. Each value in an array has an _index_ and each index has _a reference in a memory address_. Each value can be accessed by using their _indexes_. The index of an array starts from _zero_ and the last element is less by one from the lenght of the array.
707705

@@ -791,7 +789,7 @@ console.log(shoppingCart[lastIndex]) -> // Sugar
791789
1. Remove the last IT company from the array
792790
1. Remove all IT companies
793791

794-
## More on Arrays
792+
# More on Arrays
795793

796794
There are different methods to manipulate an array. These are some of the available methods to deal with arrays:_Array,length, concat, indexOf, slice, splice, join, toString, includes, lastIndexOf, isArray, fill, push, pop, shift, unshift_
797795
Array:To create an array.
@@ -971,7 +969,7 @@ const todoList = [
971969

972970
```
973971
974-
## Functions
972+
# Functions
975973
976974
A function is a block of code designed to perform a certain task.
977975
A function is declared by a function key word followed by a name, followed by parentheses (). A parentheses can take a parameter. If a function take a parameter it will be called with argument. A function can also take a default paramenter.
@@ -1240,7 +1238,7 @@ const square = n => n * n; // -> 4
12401238
```
12411239
12421240
1243-
## Object
1241+
# Object
12441242
12451243
Everything can be an object and objects do have properties and properties have values.
12461244
@@ -1840,7 +1838,7 @@ Asabeneh Yetayeh lives in Finland. He is 200 years old. He is an Instructor and
18401838
2. Assign the elements of countries array to fin, est, sw, den, nor
18411839
3. Destructure the rectangle object by its propertis or keys.
18421840
1843-
## Document Object Model
1841+
# Document Object Model (DOM)
18441842
HTML document is structured as a JavaScript Object. Every HTML element has a different properties which can help to manipulate it. It is possible to get, create, append or remove HTML elements using JavaScript. Check the examples below. Selecting HTML element using JavaScript is similar to select CSS. To select an HTML element, we use tag name, id, class name. To create an HTML element we use tag name.
18451843
18461844
### Getting Element

0 commit comments

Comments
 (0)