From dfc944e8bb61f92311548a5e0ed3ff42895eb5b1 Mon Sep 17 00:00:00 2001 From: Aziz Date: Tue, 18 Feb 2025 12:30:50 +0530 Subject: [PATCH] Quiz: correct code sample typo --- .../en-US.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/questions/what-are-the-benefits-of-using-spread-syntax-and-how-is-it-different-from-rest-syntax/en-US.mdx b/questions/what-are-the-benefits-of-using-spread-syntax-and-how-is-it-different-from-rest-syntax/en-US.mdx index 86c4993..7eb70cb 100644 --- a/questions/what-are-the-benefits-of-using-spread-syntax-and-how-is-it-different-from-rest-syntax/en-US.mdx +++ b/questions/what-are-the-benefits-of-using-spread-syntax-and-how-is-it-different-from-rest-syntax/en-US.mdx @@ -41,7 +41,7 @@ const newArray = [...array]; console.log(newArray); // Output: [1, 2, 3] // Copying objects -const obj = { name: 'John', age: 30 }; +const person = { name: 'John', age: 30 }; const newObj = { ...person, city: 'New York' }; console.log(newObj); // Output: { name: 'John', age: 30, city: 'New York' } ``` @@ -66,8 +66,8 @@ const obj2 = { qux: 'baz', }; -const merged = { ...obj1, ...obj2 }; -console.log(copyOfTodd); // Output: { foo: "bar", qux: "baz" } +const mergedObj = { ...obj1, ...obj2 }; +console.log(mergedObj); // Output: { foo: "bar", qux: "baz" } ``` ### Passing arguments to functions