Quiz of javascript regarded doubts

var num1=100;

var result= num1>50 ? (num1+10)<100 ? (num1+20):(num1+50)<200 ? (num1+500):(num1+200):num1;
Please explain with solution line by line . I can face problem to understanding.

1 Like

Refer this,

1 Like

please explain it step by step or line by line.

Hi @thakurvipinsingh2711 , please click on the Ternary Operator, it will lead you to the step by step solution already provided: