Skip to content

Commit

Permalink
Add Q82 (#2025)
Browse files Browse the repository at this point in the history
Q82. What is wrong with this code?
  • Loading branch information
lucasca95 authored Aug 5, 2021
1 parent ca25d07 commit ad36e81
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions javascript/javascript-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -880,3 +880,20 @@ class TaxCalculator {
- [ ] new TaxCalculator().calculate(\$50);
- [x] TaxCalculator.calculate(50);
- [ ] new TaxCalculator().calculate(50);
#### Q82. What is wrong with this code?
```js
const foo = {
bar(){
console.log("Hello, world!");
},
name: "Albert",
age: 26,
}
```
- [ ] The function bar needs to be defined as a key/value pair.
- [ ] Trailing commas are not allowed in JavaScript.
- [ ] Functions cannot be declared as properties of objects.
- [x] Nothing, there are no errors.

0 comments on commit ad36e81

Please sign in to comment.