
// const myFunc = (callBackFunc) => {
//     let value = 50;
//     callBackFunc(value);
// };

// myFunc(value => {
//     console.log(value)
// });

//callbacks & foreach
let people = ["david", "nika", "jozica", "domen", "eva", "denis"];

// people.forEach(function(person){
//     console.log(person);
// });



// people.forEach((person, index) => {
//     console.log(index, person);
// });

const logPerson = (person, index) => {
    console.log(`${index}- hello ${person}`);
};
people.forEach(logPerson);

