Essential Javascript for React That Every Developer Should Know
Can I Learn React With Basic JavaScript?
Functions and Arrow Functions:
In JavaScript, there are two types of functions. You have normal functions and arrow functions.Let’s explore the difference between them.
Arrow functions was introduced in ES6. And it introduced a simple and shorter way to create functions.Here’s how to create a normal function, with arguments, which returns something:
const result = num1 * num2
return result
}
If want to transform this into an arrow function:
const result = num1 * num2
return result
}
return num1 * num2
}
JavaScript Objects:
In JavaScript, an object is an unordered collection of key-value pairs. Each key-value pair is called a property.
The key of a property can be a string. And the value of a property can be any value, e.g., a string, a number, an array, and even a function.
JavaScript provides you with many ways to create an object. The most commonly used one is to use the object literal notation.
The following example creates an empty object using the object literal notation:
firstName: ‘John’,
lastName: ‘Doe’
};
JavaScript Arrays and Array Methods:
![](https://dexterik.com/wp-content/uploads/2023/06/1_U1oiiB9RM47B_Llz4Lio9A@2x.jpg)