|
2 | 2 |
|
3 | 3 | I post daily multiple choice JavaScript questions on my [Instagram](https://www.instagram.com/theavocoder), which I'll also post here!
|
4 | 4 |
|
5 |
| -From basic to advanced: test how well you know JavaScript, refresh your knowledge a bit, or prepare for your coding interview! :muscle: :rocket: I update this repo weekly with new questions. Last update: <b>June 29th</b> |
| 5 | +From basic to advanced: test how well you know JavaScript, refresh your knowledge a bit, or prepare for your coding interview! :muscle: :rocket: I update this repo weekly with new questions. Last update: <a href=#20190629><b>June 29th</b></a> |
6 | 6 |
|
7 | 7 | The answers are in the collapsed sections below the questions, simply click on them to expand it. Good luck :heart:
|
8 | 8 |
|
@@ -1659,7 +1659,7 @@ However, we created a global variable `y` when setting `y` equal to `10`. This v
|
1659 | 1659 |
|
1660 | 1660 | ---
|
1661 | 1661 |
|
1662 |
| -###### 55. What's the output? |
| 1662 | +###### <a name=20190629></a>55. What's the output? |
1663 | 1663 |
|
1664 | 1664 | ```javascript
|
1665 | 1665 | class Dog {
|
@@ -1783,7 +1783,7 @@ console.log(delete age);
|
1783 | 1783 |
|
1784 | 1784 | #### Answer: A
|
1785 | 1785 |
|
1786 |
| -The `delete` operator returns a boolena value: `true` on a successful deletion, else it'll return `false`. However, variables declared with the `var`, `const` or `let` keyword cannot be deleted using the `delete` operator. |
| 1786 | +The `delete` operator returns a boolean value: `true` on a successful deletion, else it'll return `false`. However, variables declared with the `var`, `const` or `let` keyword cannot be deleted using the `delete` operator. |
1787 | 1787 |
|
1788 | 1788 | The `name` variable was declared with a `const` keyword, so its deletion is not successful: `false` is returned. When we set `age` equal to `21`, we actually added a property called `age` to the global object. You can successfully delete properties from objects this way, also the global object, so `delete age` returns `true`.
|
1789 | 1789 |
|
@@ -1811,7 +1811,7 @@ console.log(y);
|
1811 | 1811 |
|
1812 | 1812 | #### Answer: C
|
1813 | 1813 |
|
1814 |
| -We can unpack values from arrays or properties from objects through destructing. For example: |
| 1814 | +We can unpack values from arrays or properties from objects through destructuring. For example: |
1815 | 1815 |
|
1816 | 1816 | ```javascript
|
1817 | 1817 | [a, b] = [1, 2];
|
|
0 commit comments