Can I ask you something too? I'm a little confused. I thought Object.keys() changed an object to an array with its keys, but actually it doesn't, instead it just checks/sees the object's keys. Is that right?
In this solution, the key is used to check the array provided as an argument using the syntax array[key], they're simply checking an array not provided by the callback.
sorry guys stupid question , can someone explain how the filter method working here? the array that is passed to the filter method here is only [keys] , how filter compare values that are not from the array that i passed into and return the keys in the end?
This is a variable inside the filter loop
Hey, Can you explain what is r in here?
Thank you
Just to remeber
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
Can I ask you something too? I'm a little confused. I thought
Object.keys()
changed an object to an array with its keys, but actually it doesn't, instead it just checks/sees the object's keys. Is that right?In this solution, the key is used to check the array provided as an argument using the syntax array[key], they're simply checking an array not provided by the callback.
sorry guys stupid question , can someone explain how the filter method working here? the array that is passed to the filter method here is only [keys] , how filter compare values that are not from the array that i passed into and return the keys in the end?