From aad6f5e3411138e6c88aad22ac3e0b891cd17be7 Mon Sep 17 00:00:00 2001 From: wonderingabout Date: Sun, 29 Mar 2020 08:42:52 +0200 Subject: [PATCH] fix missing js formatting --- .../02-rest-parameters-spread/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/06-advanced-functions/02-rest-parameters-spread/article.md b/1-js/06-advanced-functions/02-rest-parameters-spread/article.md index fad6dc5c..7e728e7a 100644 --- a/1-js/06-advanced-functions/02-rest-parameters-spread/article.md +++ b/1-js/06-advanced-functions/02-rest-parameters-spread/article.md @@ -231,7 +231,7 @@ Remember when we talked about `Object.assign()` [in the past](https://javascript It is possible to do the same thing with the spread operator! -``` +```js run let arr = [1, 2, 3]; let arrCopy = [...arr]; // spread the array into a list of parameters // then put the result into a new array @@ -250,7 +250,7 @@ alert(arrCopy); // 1, 2, 3 Note that it is possible to do the same thing to make a copy of an object: -``` +```js run let obj = { a: 1, b: 2, c: 3 }; let objCopy = { ...obj }; // spread the object into a list of parameters // then return the result in a new object