Im studying JavaScript,
I can make variables, and they work. However when I place them in side a function they dont work..? why? I recieve the answer ( 10 0 undefined)
var totalPeople = 3;
var totalApples = 30;
function tree(totalApples, totalPeople) {
const shareApples = totalApples / totalPeople;
const moduloApples = totalApples % totalPeople;
const output = shareApples;
console.log(output + " " + moduloApples);
}
console.log(tree(totalApples, totalPeople));