The key there is "copies all enumerable own properties". The Object.assign() method copies all enumerable own properties from one or more source objects to a target object One thing to note Object.assign is that it doesn't actually produce a pure array. ![]() The newer methods spread and om are better equipped to handle these and will split your string by grapheme clusters □ # A caveat about Object.assign ⚠️ This is what's called grapheme clusters - where the user perceives it as 1 single unit, but under the hood, it's in fact made up of multiple units.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |