-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实现 #572
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
const test = {
a: 1,
b: 2,
c: 3
}
const ObjMap = (obj, fn) => {
const keys = Object.keys(obj)
for (let i =0 ; i < keys.length; i++) {
obj[keys[i]] = fn(obj[keys[i]])
}
return obj
}
console.log(ObjMap(test, item => item += 1))
The text was updated successfully, but these errors were encountered: