Home
Javascript Fundamentals
# Javascript basics
# Javascript arrays
# Javascript objects
# Javascript dates
# Javascript Sets
Javascript DOM
# DOM selector methods
# Events and user interactions
# DOM manipulation
# DOM fundamentals
# Recursive functions
Challenge Rush
Random Challenge
// Write a function that takes two objects as arguments// Unfortunately, the property 'b' in the second object has the wrong key// It should be named 'd' instead// Merge both objects and correct the wrong property name// Return the resulting object// It should have the properties 'a', 'b', 'c', 'd', and 'e' function myFunction ( x, y ) { return }
return
myFunction({ a: 1, b: 2 }, { c: 3, b: 4, e: 5 })
{ a: 1, b: 2, c: 3, e: 5, d: 4}
myFunction({ a: 5, b: 4 }, { c: 3, b: 1, e: 2 })
{ a: 5, b: 4, c: 3, e: 2, d: 1}