The Complete JavaScript Course (2022) From Zero to Expert!
The Complete JavaScript Course (2022) From Zero to Expert!
Introduction
Welcome to my Complete Javascript Course (2022) From Zero To Expert, in just one blog. In this course you will learn everything you need to know to get started. I helped an expert developer learn Javascript, and now he makes 1,20,000$ per month just from making a website from Javascript. Lets dive right in.
1. Overview
Javascript is a coding language made to add functionality to web pages. To create a web page you need HTML, CSS and Javascript. HTML creates the page layout, CSS styles the web pages and Javascript adds functionality to it.
2. Getting Started
To start coding Javascript you need a file to code on and also a text editor, I recommend using Visual Studio Code (Vs Code). Once you have downloaded the text editor, you have to install Javascript in it. Then create a new file, and you are ready to go. First lets get to know how to write something, in Javascript writing something is really simple. Here's how to write something:
document.write("Hello World"); - Let me explain to you what this is.
first where we are typing "document" we are mentioning the web page that you wanna display your result on, then when we type ".write" it means that we have to write something in the document. Then ("Hello World"); is the text you wanna print, make sure that you have parentheses at the starting and your text should be between quotations.
3. Variables
There are three ways to declare a variable in Javascript, using var , let, const. But before creating variables we must understand what variables are, variables are counters in which values are stored, these are really important for every single project. So how to choose which of these three should you use in your code, if you want to create a variable which you want to change then you should use let, if you want to set a value and then never change it then you should use const. If you want your variable to run in older browsers then you should use var. Here's how to make all three of them:
4. Operators
Ok we learned to print text, now lets learn how to do mathematic sums in Javascript, its really simple you can create a variable and then set the variable to the addition of the two numbers using the operator (+) that would add your two numbers and set the variable to the result. You can also subtract in the same way but instead of an add simple you use the subtract symbol. You can also multiply and divide to multiply you use (*) and to divide two numbers you use (/). Here's a photo of the code for better understanding:
5. Functions
Functions are really important in Javascript, you can define a function and then call it at any time, once you call it. It would repeat the code in it. Functions can also be run when they get a sign for example whenever someone would click a button a function can appear here's an image for better results:(this image is not for making the function execute when a button is clicked its just to show a functions code)
This was it for this blog, thanks for learning Javascript basics with me. See you later.
Comments
Post a Comment