65.6k views
2 votes
What type would the object X be in the following statement:

if (X) { ... }

A.
Number
B.
Boolean
C.
String
D.
Date

User Badr Tazi
by
5.4k points

2 Answers

5 votes
I think it’s Boolean
User Pedrom
by
5.3k points
3 votes

Answer:

Boolean

Step-by-step explanation:

If statement condition always returns true or false,which is a boolean data type.

X is true or false

it maybe a variable or an expression.

User Icelean
by
5.0k points