Introduction to Javascript 2020 part 1

Datatypes

Javascript is not static typed language, its dynamically typed eg
Instead of having
Int x = 5
In javascript we have it like
x = 5
In javascript we have

 Let X = 5          //Number
 Const Name = ‘John’.    //String 
 Const True = True.       //Boolean
 Let Car = {}.  //Objects ..Etc 

Primitives
A primitive is not an object and has no methods of its own. All primitives are immutable.

Arrays

We have learned that variable stores values in the memory of the computer, what if we have more than a value, we have multiple values that we need to store collectively in the computer memory ? like a list of groceries, or a list of workers, etc
That’s where arrays comes in; Learn more about javascript arrays.
Arrays are collection of multiple values, that are stored and accessed by indexes.

ListOfWorkers = [“Tony”, “Raheem”, “Alex”, “Joe”]
ListOfWorkers[1] = Raheem

Leave a Comment

Your email address will not be published. Required fields are marked *