- 1

operators

Guess the value stored in the "rowHeight" variable value of the following code: let height = 40 let isCheck = true let rowHeight = height + (isCheck ? 50 : 20) Can anyone help me?

7th Apr 2020, 6:07 PM
Alireza Hatefi
Alireza Hatefi - avatar
2 Answers
+ 1
Value stored in rowHeight will be 90. This is because isCheck is true so the value after ? will be considered that is 50. rowHeight= 40+50=90
7th Apr 2020, 6:20 PM
V Nikhita
V Nikhita - avatar
0
The value for the rowheight will be 90 because let height=40 let rowheight =height(is check?50:20) therefore rowheight=40+50=90
16th Aug 2021, 6:50 PM
TSATSU AHIAKU
TSATSU AHIAKU - avatar