In this story which is the second of this series, I will explain filter() and find() methods.

Filter returns a new array. The difference from map() method is can manipulate the size of the new array. If there are no matches according to condition, returns an empty array.

const people = [
{
name: 'Ceren',
age: 29
},
{
name:'Esra',
age:34
},
{
name:'Aslı',
age:20
}
];
const young= people.filter((person)=>{
return person.age <30;
});
console.log(young); //[{name:'Ceren',age:29},{name:'Aslı',age:20}]
// no match
const name= people.filter((person)=> person.name === 'Seda';
);
console.log(name); //[]

Find method returns a single object and first match according to condition…


In this story, I will explain JavaScript methods. First of all, I began investigating map().

map() returns a new array and uses values from the original array when making a new one. It behaves as a for loop but the difference is that it uses less code and makes your code more readable.

const people = [
{
name: 'Ceren',
age: 29,
},
{
name:'Esra',
age:34,
},
{
name:'Aslı',
age:20,
}
];
const ages = people.map((person)=>{
return person.age;
});
console.log(ages); //[29,34,20]

In this example, map() takes each element from the array.

const people = [
{…

https://blog.alexdevero.com/fun-object-oriented-javascript/

Object-Oriented Programming (OOP) is the programming model that focuses on objects. Objects are the basic building blocks that we build applications. Which concepts are more preferred? Which ways will we use it? In this article, I will try to explain them.

OOP Concepts in JavaScript

  • Abstraction shows the main features of the object and hides details. It is important because it helps avoid code duplication.
  • Encapsulation aims to hide data and ensure to prevent access from the outside.
  • Inheritance refers to the object to take on the properties and methods of another object.
  • Polymorphism refers to multiple objects use the same functionality and perform…

https://unsplash.com/@grakozy

HTTP -Hypertext Transfer Protocol- is a protocol that allows us to communicate between requests from a web browser or client and responses from web servers. JavaScript provides the opportunity to perform HTTP requests with many alternative methods such as Ajax, Fetch, JQuery, Axios.

Why Axios?

Axios is a very popular promise-based HTTP client that works in both Browser and Node.js platforms. I prefer Axios in the examples because it provides more practical and comprehensive solutions for HTTP methods.

We can make HTTP requests using different methods in JavaScript. But how? Here are the most commonly used methods:

1.GET: This method is used…

cerensolpan

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store