// JavaScript

JavaScript code examples and explanations

Recently I came across a post on Twitter with really great JavaScript explanations.

A really great information resource, supported by cheat sheets, with sample code snippets and detailed Turkish explanations.

The account that shared it: https://twitter.com/ozantekindev

The GitHub address for the documents: https://github.com/ozantekin/100DaysOfJS/tree/main/00-Yaz%C4%B1VideoCheatSheet

I also want to quote one of the items here.

.pop()

Removes the last element of the array.

.reverse()

Reverses the array. The first index becomes the last, and the last becomes the first.

.push()

Used to add an element to the end of the array.

.toString()

Converts the array to a string.

.forEach()

Lets us iterate over the indexes in the array.

.sort()

Sorts the elements of an array in ascending UTF-16 order.

.shift()

Removes the first element of the array.

.filter()

Prints to the console if the element satisfies the condition.

.every()

Tests whether the elements in the array pass the test implemented by the callback function.

.map()

Creates a new array with the return value of the callback function called on each element.

.unshift()

Adds an element to the start of the array.

.slice()

Selects a portion of the array and prints a copy of it.

Array.from()

Creates a new array from an array-like or iterable object.

.include()

Checks whether the array contains the element.

.some()

Returns true if any (some) element in the array passes the test implemented by the callback function.

.reduce()

Reduces the array to a single element. It passes the return value of the previous element in the callback function.

.splice()

Removes elements from an array, replaces them, or adds new ones in their place.

.concat()

Merges two or more arrays into a new array.

.join()

Returns a new string consisting of the array elements separated by a comma or a specified delimiter.

.findindex()

Returns the index of the first element in the array that satisfies the callback function.

// FEEDBACK

Was this useful?

Your rating shows how helpful this note is to other readers.

Was this useful?

Click the stars to rate.

Average rating 0 / 5. Total votes: 0

No one has rated this post yet. Be the first!

Sorry this post was not helpful.

Your feedback is valuable to us.

How can we make this post more helpful?

// JOIN THE CONVERSATION

Share your experience

Got a question, a different solution or a note to add?

// KEEP READING

One more note.

All posts ↗︎