checking added image size

pull/86/head
Pawel Kiczko 5 years ago
parent 69a857c019
commit 2e8aadbf5f

@ -25,27 +25,27 @@
- [Browser](#browser) - [Browser](#browser)
- [Installing Google Chrome](#installing-google-chrome) - [Installing Google Chrome](#installing-google-chrome)
- [Opening Google Chrome Console](#opening-google-chrome-console) - [Opening Google Chrome Console](#opening-google-chrome-console)
- [Writing Code on browser Console](#writing-code-on-browser-console) - [Writing Code on Browser Console](#writing-code-on-browser-console)
- [Console.log](#consolelog) - [Console.log](#consolelog)
- [Console.log with multiple arguments](#consolelog-with-multiple-arguments) - [Console.log with Multiple Arguments](#consolelog-with-multiple-arguments)
- [Comment](#comment) - [Comment](#comment)
- [Syntax](#syntax) - [Syntax](#syntax)
- [Arithmetics](#arithmetics) - [Arithmetics](#arithmetics)
- [Code Editor](#code-editor) - [Code Editor](#code-editor)
- [Installing Visual Studio Code](#installing-visual-studio-code) - [Installing Visual Studio Code](#installing-visual-studio-code)
- [How to use visual studio code](#how-to-use-visual-studio-code) - [How to Use Visual Studio Code](#how-to-use-visual-studio-code)
- [Adding JavaScript to a web page](#adding-javascript-to-a-web-page) - [Adding JavaScript to a Web Page](#adding-javascript-to-a-web-page)
- [Inline Script](#inline-script) - [Inline Script](#inline-script)
- [Internal script](#internal-script) - [Internal Script](#internal-script)
- [External script](#external-script) - [External Script](#external-script)
- [Multiple External scripts](#multiple-external-scripts) - [Multiple External Scripts](#multiple-external-scripts)
- [Introduction to Data types](#introduction-to-data-types) - [Introduction to Data Types](#introduction-to-data-types)
- [Number](#number) - [Number](#number)
- [String](#string) - [String](#string)
- [Booleans](#booleans) - [Booleans](#booleans)
- [Undefined](#undefined) - [Undefined](#undefined)
- [Null](#null) - [Null](#null)
- [Checking Data types](#checking-data-types) - [Checking Data Types](#checking-data-types)
- [Comments](#comments) - [Comments](#comments)
- [Variables](#variables) - [Variables](#variables)
- [💻 Day 1: Exercises](#%f0%9f%92%bb-day-1-exercises) - [💻 Day 1: Exercises](#%f0%9f%92%bb-day-1-exercises)
@ -54,9 +54,9 @@
## Introduction ## Introduction
**Congratulations** for deciding to participate in a 30 days of JavaScript programming challenge . In this challenge you will learn everything you need to be a JavaScript programmer and in general the whole concepts of programming. In the end of the challenge you will get a 30DaysOfJavaScript programming challenge certificate. Join the [telegram group](https://t.me/ThirtyDaysOfJavaScript). **Congratulations** for deciding to participate in 30 days of JavaScript programming challenge. In this challenge you will learn everything you need to be a JavaScript programmer, and in general, the whole concept of programming. In the end of the challenge you will get a 30DaysOfJavaScript programming challenge certificate. Join the [telegram group](https://t.me/ThirtyDaysOfJavaScript).
**A 30DaysOfJavaScript** challenge is a guide for both beginners and advanced JavaScript developers. Welcome to JavaScript. I enjoy using and teaching JavaScript and I hope you will do so. JavaScript is the language of the browser. **A 30DaysOfJavaScript** challenge is a guide for both beginners and advanced JavaScript developers. Welcome to JavaScript. I enjoy using and teaching JavaScript and I hope you will do so too. JavaScript is the language of the web browser.
In this step by step tutorial, you will learn JavaScript, the most popular programming language in the history of mankind. In this step by step tutorial, you will learn JavaScript, the most popular programming language in the history of mankind.
You use JavaScript **_to add interactivity to websites, to develop mobile apps, desktop applications, games_** and nowadays JavaScript can be used for **_machine learning_** and **_AI_**. You use JavaScript **_to add interactivity to websites, to develop mobile apps, desktop applications, games_** and nowadays JavaScript can be used for **_machine learning_** and **_AI_**.
@ -88,14 +88,14 @@ After downloading double click and install
![Install node](images/install_node.png) ![Install node](images/install_node.png)
We can check if node is installed in our local machine by opening our device terminal or command prompt. We can check if node is installed on our local machine by opening our device terminal or command prompt.
```sh ```sh
asabeneh $ node -v asabeneh $ node -v
v12.14.0 v12.14.0
``` ```
I am using node version 12.14.0, which is the recommended version of node. When making this tutorial I was using node version 12.14.0, but now the recommended version of node.js for download is 12.17.0.
### Browser ### Browser
@ -109,18 +109,18 @@ Install [google chrome](https://www.google.com/chrome/) if you do not have one y
#### Opening Google Chrome Console #### Opening Google Chrome Console
You can open Google Chrome either by clicking three dots at the top right corner of the Chrome browser or using a shortcut. I prefer using shortcuts. You can open Google Chrome console either by clicking three dots at the top right corner of the browser, selecting _More tools -> Developer tools_ or using a keyboard shortcut. I prefer using shortcuts.
![Opening chrome](images/opening_developer_tool.png) ![Opening chrome](images/opening_developer_tool.png)
To open the Chrome console using a short cut. To open the Chrome console using a keyboard shortcut.
```sh ```sh
Mac Mac
Command+Option+I Command+Option+J
Windows: Windows/Linux:
Ctl+Shift+I Ctl+Shift+J
``` ```
![Opening console](images/opening_chrome_console_shortcut.png) ![Opening console](images/opening_chrome_console_shortcut.png)
@ -130,7 +130,7 @@ Let us write a JavaScript code on the Google Chrome console:
![write code on console](./images/js_code_on_chrome_console.png) ![write code on console](./images/js_code_on_chrome_console.png)
#### Writing Code on browser Console #### Writing Code on Browser Console
We can write any JavaScript code on the Google console or any browser console. However, for this challenge, we only focus on Google Chrome console. Open the console using: We can write any JavaScript code on the Google console or any browser console. However, for this challenge, we only focus on Google Chrome console. Open the console using:
@ -144,13 +144,13 @@ Ctl+Shift+I
##### Console.log ##### Console.log
To write our first JavaScript code, we used a builtin function **console.log()**. We passed an argument as input data, and the function displays the output. We passed 'Hello, World' as input data or argument in the console.log() function. To write our first JavaScript code, we used a built-in function **console.log()**. We passed an argument as input data, and the function displays the output. We passed 'Hello, World' as input data or argument in the console.log() function.
```js ```js
console.log('Hello, World!') console.log('Hello, World!')
``` ```
##### Console.log with multiple arguments ##### Console.log with Multiple Arguments
The console.log(param1, param2, param3), can take multiple arguments. The console.log(param1, param2, param3), can take multiple arguments.
@ -162,13 +162,13 @@ console.log('HAPPY', 'NEW', 'YEAR', 2020)
console.log('Welcome', 'to', 30, 'Days', 'Of', 'JavaScript') console.log('Welcome', 'to', 30, 'Days', 'Of', 'JavaScript')
``` ```
As you can see from the above snippet code, *console.log()* can take multiple arguments. As you can see from the snippet code above, *console.log()* can take multiple arguments.
Congratulations! You wrote your first JavaScript code using *console.log()*. Congratulations! You wrote your first JavaScript code using *console.log()*.
##### Comment ##### Comment
We add comments to our code. Comments are very important to make code more readable and to leave remarks in our code. JavaScript does not execute the comment part of our code. Any text starts with // in JavaScript is a comment or anything enclose like this /* */ is a comment. We add comments to our code. Comments are very important to make code more readable and to leave remarks in our code. JavaScript does not execute the comment part of our code. Any text line starting with // in JavaScript is a comment or anything enclosed like this /* */ is a comment.
**Example: Single Line Comment** **Example: Single Line Comment**
@ -197,7 +197,7 @@ console.log("Hello, World!")
console.log('Hello, World!') console.log('Hello, World!')
``` ```
So far, we saw how to display text using a *console.log()*. If we are printing text or string using *console.log()*, the text has to be under the single, double, or backtick. So far, we saw how to display text using a *console.log()*. If we are printing text or string using *console.log()*, the text has to be under the single quote, double quote, or a backtick quote.
**Example:** **Example:**
```js ```js
@ -219,24 +219,24 @@ console.log(3 - 2) // Subtraction
console.log(2 * 3) // Multiplication console.log(2 * 3) // Multiplication
console.log(3 / 2) // Division console.log(3 / 2) // Division
console.log(3 % 2) // Modulus - finding remainder console.log(3 % 2) // Modulus - finding remainder
console.log(3 ** 2) // Exponential console.log(3 ** 2) // Exponentiation
``` ```
### Code Editor ### Code Editor
We can write our codes on the browser console, but it won't be for bigger projects. In a real working environment, developers use different code editors to write their codes. In this 30 days python JavaScript challenge, we will use visual studio code. We can write our codes on the browser console, but it won't do for bigger projects. In a real working environment, developers use different code editors to write their codes. In this 30 days python JavaScript challenge, we will use Visual Studio Code.
#### Installing Visual Studio Code #### Installing Visual Studio Code
VVisual studio code is a very popular open-source text editor. I would recommend to [download](https://code.visualstudio.com/) visual studio code, but if you are in favor of other editors, feel free to follow with what you have. VVisual studio code is a very popular open-source text editor. I would recommend to [download Visual Studio Code](https://code.visualstudio.com/), but if you are in favor of other editors, feel free to follow with what you have.
![Vscode](images/vscode.png) ![Vscode](images/vscode.png)
If you installed visual studio code, let us start using it. If you installed Visual Studio Code, let us start using it.
#### How to use visual studio code #### How to Use Visual Studio Code
Open the visual studio code by double-clicking the visual studio icon. When you open it, you will get this kind of interface. Try to interact with the labeled icons. Open the Visual Studio Code by double-clicking its icon. When you open it, you will get this kind of interface. Try to interact with the labeled icons.
![Vscode ui](./images/vscode_ui.png) ![Vscode ui](./images/vscode_ui.png)
@ -246,11 +246,13 @@ Open the visual studio code by double-clicking the visual studio icon. When you
![script file](images/scripts_on_vscode.png) ![script file](images/scripts_on_vscode.png)
![Installing Live Server](images/vsc_live_server.png)
![running script](./images/running_script.png) ![running script](./images/running_script.png)
![coding running](./images/launched_on_new_tab.png) ![coding running](./images/launched_on_new_tab.png)
## Adding JavaScript to a web page ## Adding JavaScript to a Web Page
JavaScript can be added to a web page in three different ways: JavaScript can be added to a web page in three different ways:
- **_Inline script_** - **_Inline script_**

Loading…
Cancel
Save