From c024cb63633e1041883c1811b08a5debca03d36d Mon Sep 17 00:00:00 2001 From: Vishal Vishwakarma Date: Sat, 15 Jul 2023 09:28:56 +0530 Subject: [PATCH] Syntax Corrections Syntax errors: 1. There is an extra closing parenthesis ')' at the end of the first line that should be removed. 2. In the second line, the square brackets '[]' should be replaced with parentheses '()' for creating a Set. --- README.md | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4e7ce6a..7489bb8 100644 --- a/README.md +++ b/README.md @@ -372,9 +372,7 @@ let airplane = { ratings: 4.9, book(passenger, flightNum) { - console.log( - `${passenger} Booked flight in ${this.flightName} with flight Number ${this.atacode}${flightNum}` - ); + console.log(`${passenger} Booked flight in ${this.flightName} with flight Number ${this.atacode}${flightNum}`); }, }; @@ -447,12 +445,7 @@ _[From video lecture 6.2]_ ```html
- +
@@ -1161,13 +1154,9 @@ console.log(name, age); _[From video lecture 12.3]_ ```js +let nums = [5, 7, 4, 9, 2, 8]; -let nums = [5,7,4,9,2,8]; - - - -let newNums = "store Shallow copy of nums inside newNums variable") - +let newNums = 'store Shallow copy of nums inside newNums variable'; ``` **12.5:** You have given an array as below . Create a function which accept **multiple** elements as an argument and return last **4** element of the array @@ -1322,6 +1311,7 @@ let set = new Set[(1, 2, 3, 2, 1, 3, 4, 12, 2)](); output; let arr = 'Do something here to convert....'; +console.log(arr); ``` **Question 8:** Guess the **Output** and Explain Why?