Free Printable Worksheets
Font size
More settings
How do you define an object literal with a name property and a greet method?
let obj = { name: "John", function greet() { console.log("Hello"); } };
let obj = { name: "John", greet: function() { console.log("Hello"); } };
let obj = { name: "John", greet: () => console.log("Hello") };
Both (b) and (c)
What will the following code output?
let person = { name: "Alice", age: 25 };
console.log(person.job);
undefined
null
Throws an error
NaN
View all
5 questions
Repaso Clase 6
Worksheet
•
University
7 questions
Study Club Fun Java #1
BASIC OPERATING SYSTEM
B2 - TS#2
User Input in Python
9th Grade - University
Pemanasan
Network Cables Exercises
12th Grade - University
Future Projects