Hi guys, in this lesson we will talk about basic things about JavaScript. in JavaScript, there is no specific type like in Java. If you want to go with specific types, you can use TypeScript. in JavaScript. There are generic types. These types are var, length and cost.
All of them can be used for variable, but the differences among them are scoping. And overriding. Scope essentially means where these variables are available for years, where the corporations are globally scoped, or functional scoped. If we use it outside of function, we can reach it globally. If we use it inside of function, we can reach it functionality. And we can override it after initialization.
Our second generic type is length. Length declarations are globally scoped or blocked scoped. Actually this is the main difference between var and lead. For example, when we write a for each block with var, then we can reach for increment value in function. But when we write this with less variable, we could not reach the increment video in function because let 10 used in describe blog only. The other difference between two of them is we can declare the wartime VA we could not read the lead variable.
Our last generic type is cost, cost maintains constant various costs declarations shape, some similarities with length declarations cost cannot be updated or declared. So if we set it one time, then we cannot change the video of it. Other thing about JavaScript is we can create constructors in your secret and we can reach it with creating new instances. But to reach it, we don't need To describe all parameters one by one, we should describe constructor parameters according to order of parameters. But if we don't define parameters, JavaScript will set them to now value automatically. Other think about JavaScript is the structured in JavaScript, instead of accessing elements in an array with the index numbers, or instead of accessing elements in an object with their key radio, we can use destructuring.
In JavaScript. For example, we can reach the first element of an array with normal way or with the structure in a way like that. We can reach to field of an OSHA with normal way, or with the structure way like that. Lasting about your secret is equal operators enjoy a secret. We can compare videos with double equal signs or terrible equal signs. When we compare with double equal signs, we can just compare the very old fields.
When we compare with triple equal signs. We can also compare the types of fields. Of course, there are other many things in JavaScript, but for beginning for our course, this will be enough. That's all. Thank you.