Arrow function basics in javascript 😃

preview_player
Показать описание
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.

All the learning resources such as code files, documentations, articles and community discussions are available on our website:

You can find our discord link, github link etc on the above website.

Рекомендации по теме
Комментарии
Автор

How many of u are here after quarantine**

prathameshjadhav
Автор

const todo = [{
title: 'Learn coding',
isDone: true,

}, {
title: 'Work-Out',
isDone: false,

}, {
title: 'Go to office',
isDone: true,

}, {
title: 'meet customer',
isDone: false,

}, {
title: 'Drive home',
isDone: true,

}, {
title: 'collect laundry',
isDone: false,

}]

let thingsNotDone = todo.filter((todo) => todo.isDone === false)

for (var i = 0; i < thingsNotDone.length; i++) {

}


This one definitely works but hope this is the intended solution.
Thank you Hithesh for your effort. Appreciate it

anooppremkumar
Автор

Well documentations are really helpful when you know how to look upon them.
const titleNotDone = myTodos.filter(todos => todos.isDone === false)
.map(todos => todos.title)

nishchaysharma
Автор

Assignment :

const ThingsNotDone = todo.filter((todos) => todos.done === false);
=> console.log(things.title));

prakharagarwal
Автор

This really explain the arrow function is! Thanks Hitesh

indracahyadi
Автор

const notDone = todos.filter((todo) => todo.isDone === false);

notDone.forEach(todoo => console.log(todoo.title));

fabienbedogue
Автор

you are awesome, if i visit to india the first person to meet will be you.
thnks for this on..

shahzadamr
Автор

//Object array
const toDos = [{
title: "Morning Gym",
isDone: true
}, {
title: "Morning Yoga",
isDone: true
}, {
title: "Meetings",
isDone: false
}, {
title: "Lunch meet",
isDone: false
}, {
title: "Assignments",
isDone: true
}, {
title: "UI design",
isDone: false
}]

//Filter logic using Arrow function
const notDone = toDos.filter((todo) => {
if(todo.isDone === false)
{
console.log(todo.title)
}
});

//Calling the method
notDone;

manivelarung
Автор

Your very likeable personality makes your videos easy and fun to learn! Blessings from D.C!

reidwilliamson
Автор

//Assignment code for the video

const newTodo=[
{
title:'Brush',
isDone:true,
},
{
title:'Bath',
isDone:true,
},
{
title:'Breakfast',
isDone:false,
},
{
title:'Catch up bus',
isDone:true,
},
{
title:'Complete assignment',
isDone:false,
},
{
title:'Study',
isDone:false,
}
]
const
)
for (let i = 0; i < todo.length; i++) {
console.log(todo[i].title)
}

vinaymanikant
Автор

Your way of teaching style is so clear and easy

sunilnarute
Автор

*Not able to print the Objects* inside the Array. It only printing ' [ ] ' . Not printing isDone Objects. Why it is so? I have used VSCode, console also.

TechnoSaroha
Автор

you are the best teacher as well as best programmer.The way of explaining coding concepts are very simple.... I have no words to say about you 🤔

pashtoonpk
Автор

const findTrueTodo = myTodos.filter((todo) => {
if( todo.isDone === true ){
console.log(todo.title)
}
})


Working code
ps: Make changes in variable name according to your needs

divyansh_dk
Автор

Trying to learn this while sick doesn't help, but had fun figuring it out.
const todoDone = todos.filter((todos) => {if (todos.notDone === true) {console.log(todos.title)}})

kal_eide
Автор

Edited-
const Todos=[{
title: 'Title1',
isDone: true,
}, {
title: 'Title2',
isDone: false,

}, {
title: 'Title3',
isDone: true,
}, {
title: 'Title4',
isDone: false,
}, {
title: 'Title5',
isDone: true,
}, {
title: 'Title6',
isDone: false,
}]

const result = Todos.filter((todo) => todo.isDone === false)
result.forEach(todo => console.log(todo.title));

devsharma
Автор

That's a great explanation. It would be amazing if you explain the purpose of arrow functions in the code.

balanarsimharaotanneeru
Автор

Here's the full code ..

const todos = [ {
title:'Brush Teeth',
status:"done",
}, {
title:'Bath',
status:"done",
}, {
title:'Eat breakfast',
status:"done",
}, {
title:'Eat Lunch',
status:"notDone",
}, {
title:'Eat dinner',
status:"notDone",
}, {
title:'Sleep',
status:"notDone",
} ]

let thingsNotDone = todos.filter((todos) => { if(todos.status == "notDone"

himanshuagarwal
Автор

const result = todos.filter((todo) => todo.isDone == true ? console.log(todo.title) : false);

Thanks, Hitesh for the wonderful basic videos. keep uploading!

nalinkumar
Автор

I am currently watching a react native tut online and I was totally lost, but thank God you posted this video. I wish I can link the video to the tut... thanks alot

CodingWithDapo