Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Javascript Developer I Topic 8 Question 58 Discussion

Actual exam question for Salesforce's Javascript Developer I exam
Question #: 58
Topic #: 8
[All Javascript Developer I Questions]

Given the following code:

let x = null;

console.log(typeof x);

What is the output?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Kathrine
24 days ago
The answer is A) 'object'. I remember learning that in JavaScript, null is considered an object type, even though it's a primitive value. Weird language, but that's just how it is.
upvoted 0 times
...
Colene
26 days ago
Haha, JavaScript, where null is an object. That's like saying an empty glass is a type of glass. Gotta love it!
upvoted 0 times
Marvel
9 days ago
A) \'object\'
upvoted 0 times
...
...
Sherron
1 months ago
Wait, what? 'object' for null? That's weird. I would have guessed 'null'.
upvoted 0 times
...
Hillary
1 months ago
I think the correct answer is 'object'. Even though null is a primitive value, the typeof operator returns 'object' for null in JavaScript.
upvoted 0 times
...
Glennis
2 months ago
I'm pretty sure the output is 'null'.
upvoted 0 times
...
Alverta
2 months ago
I believe the output is 'undefined'.
upvoted 0 times
...
Thaddeus
2 months ago
The output should be 'object' because null is a special value in JavaScript that represents the intentional absence of any object value.
upvoted 0 times
Adela
1 months ago
User2
upvoted 0 times
...
...
Graciela
2 months ago
I think the output is 'object'.
upvoted 0 times
...

Save Cancel