tell me about type of datastructures in javascript with examples, also highlight the most widely used ones
Here are some common data structures in JavaScript, along with examples and notes on their usage:

**1. Arrays**

An array is a collection of elements of the same data type stored in a single variable.

Example:
```
const colors = ['red', 'green', 'blue'];
```
Arrays are widely used in JavaScript for storing and manipulating collections of data.

**2. Objects**

An object is a collection of key-value pairs, where each key is a string and each value can be any data type.

Example:
```
const person = { name: 'John', age: 30, occupation: 'Developer' };
```
Objects are widely used in JavaScript for storing and manipulating data in a structured way.

**3. Sets**

A set is a collection of unique elements, without duplicates.

Example:
```
const uniqueColors = new Set(['red', 'green', 'blue','red']);
console.log(uniqueColors); // Output: Set {'red', 'green', 'blue' }
```
Sets are useful when you need to store a collection of unique elements, such as a list of unique IDs.

**4. Maps**

A map is a collection of key-value pairs, where each key is unique and can be any data type.

Example:
```
const personData = new Map([
  ['name', 'John'],
  ['age', 30],
  ['occupation', 'Developer']
]);
```
Maps are useful when you need to store a collection
  In JavaScript, there are several types of data structures that are commonly used. Here are some of the most common ones, along with examples and explanations of their use cases:

1. Arrays:

An array is a collection of elements of the same data type stored in a single variable. It is a linear data structure, meaning the elements are stored in a linear sequence.

Example:
```javascript
const fruits = ['apple', 'banana', 'orange'];
```
Use case: Storing a collection of objects or values that need to be accessed or manipulated together.

2. Objects:

An object is a collection of key-value pairs, where each key is unique and maps to a specific value. It is a hierarchical data structure, meaning the keys can have sub-keys and values.

Example:
```javascript
const person = {
  name: 'John',
  age: 30,
  occupation: 'Software Engineer'
};
```
Use case: Storing complex data that needs to be accessed by key.

3. Functions:

A function is a block of code that can be called multiple times from different parts of a program. It is a first-class citizen in JavaScript, meaning it can be assigned to variables, passed as arguments to other functions, and returned as output.

Example: