i have the following code:
let str = ("George Washington", "Abe Lincoln", "Kanye West");
function fullNameArgsToObject() {
let str = "";
let obj = {};
for (let i = 0; i < arguments.length; i++) {
console.log(arguments[i], "flag");
str = arguments[i]
}
}
fullNameArgsToObject(str);
the output of this is: "Kanye West flag" but why is it only returning Kanye West? why is not printing the first two strings? im kind of new with js, thanks!