> For the complete documentation index, see [llms.txt](https://akoserwal.gitbook.io/how-it-feels-to-learn-javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://akoserwal.gitbook.io/how-it-feels-to-learn-javascript/js-eco-system/basic-concepts.md).

# Basic Concepts

## Understanding the Basic

Let's begin with understanding basic concepts of JavaScript.

**Variables:** number, string, boolean, null, undefined, objects.

<div align="center"><img src="https://3177112200-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LCspexPwUrWFtI9kRiH%2F-LGAo8QE36U1TuMHw7uE%2F-LGAoo3-v2C1zewClYpi%2Fvariable.png?alt=media&amp;token=e51702ec-39af-47a8-a796-000d6585b69a" alt=""></div>

To define a variable of any type use keyword.

> `var nameOfVariable = (assignment operator) Value ;`
>
> `(; is must. Chrome, Firefox understand your emotions & ignores bad habit missing ; for testing purpose)`

This is different from strongly-typed programming languages liked C, C++ or Java. Where the type-checking at compile time as opposed to dynamically typed languages (run-time checking) like JavaScript as shown in the above figure using Chrome V8 run-time. I would highly recommend to try this examples in your browser console.

> `var a = 5;`
>
> `<- undefined; (return type)`

Value return by run-time is of type `undefined.`While in-case of using operator `typeof(argument)`returns string `"number".`Declaration of a variable does not return any value that is why it returned with type `undefined.`Evaluated variable does not have a assigned value or defined return type; then it will return `undefined`*.*

You can override the value with any type of variable type. This seems bit odd and sounds type unsafe while working with a large code base. Using`var`keyword again would define a new variable in the memory space. Browser gives the intellisense about available properties and methods as shown in the figure.<br>

![](https://3177112200-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LCspexPwUrWFtI9kRiH%2F-LGAo8QE36U1TuMHw7uE%2F-LGAp2qzpwzi4mXAUyH5%2Fvariabl-2.png?alt=media\&token=15632e47-4eed-499b-8b0c-05afdd3a9d9a)
