Ad
  • Default User Avatar
  • Custom User Avatar

    If you don't want to explain Object.assign (fair enough), you should add a link to MDN or something so people can look it up easily.

  • Custom User Avatar

    I pass the Simple Test. But I am stack on other tessts. And test error also describe something like the following.

      Failed! - Expected: { c: 1, d: 1 }, instead got: { d: 1 }
    

    So, I try random like the following

    var a =  { c: 1, d: 1 }
    var b = a.assign(a);
    Object {c: 1, d: 1}
    

    I got what I expected? Can you describe a little more on description?

  • Custom User Avatar

    Nowhere does it mention the method should support multiple arguments.

    And the random tests have actual and expected switched, so if you only support 1 argument, it'll look like you have too many properties instead of too few.

    Also, the tests don't check if the new method is enumerable or not. It shouldn't be - you DON'T want for ( let i in Array.from("abc") ) console.log(i) to print 0,1,2,assign.