49.4k views
4 votes
Which of the following is an object?

1) "abc"
2) new String("abc");
3) 343
4) new Date()

User Sasajuric
by
7.3k points

1 Answer

4 votes

The correct option is 4) new Date().

The correct option is 4) new Date(). This option creates a new instance of the Date object, which is an object in JavaScript. Objects are data types in JavaScript that can contain properties and methods.

User FaCoffee
by
8.1k points