FUNCTIONS AND ARRAYS

Burak Karaben
1 min readFeb 23, 2022

Before diving into mentioning the lecture that I watched yesterday evening, I have to warn you that sometimes the codes that I shared can not work since I could not find a chance to correct them.

I have been struggling for two days with the functions and I can not make progress. Therefore, I will mention the arrays after the challenges I coincided in functions.

As I mentioned before, Functions can be divided into three categories such as Function Declaration, Function Expression and Arrow Function. Function Declaration can be defined as:

When we define our function as above, we can use it before any code since the Function declarations are loaded first. However, we have another type of definition called Function Expression as follows.

Finally, we can define our function as an “Arrow Form”.

After studying functions now we can mention arrays.

So as to create an array we must use the following code.

When we write the undermentioned code subsequently, we can see the first element of the array.

--

--

Burak Karaben

Mostly historical contents but sometimes music, web design and diary