I work on Type script i need to ask question what is wrong when executed this statatment
what is error existing on block below when executing it
i need error syntax or logic
C#
Const value=Math.random()<0.5?"a":"b"
if(value !=="a")
{
}
else if(value==="b")
{
}
Salman BegRank #284 · 8.8K reputationPosted Jul 5, 2022, 10:17 PM EDT
Asma KhalidRank #160 · 14.7K reputationPosted Jul 6, 2022, 2:12 AM EDT
ahmed salahRank #1,744 · 866 reputationPosted Jul 6, 2022, 3:42 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted Jul 6, 2022, 4:10 AM EDT
Anandu G NathRank #681 · 3.5K reputationPosted Jan 24, 2024, 1:58 AM EST
try this
Const value=Math.random()<0.5?"a":"b" if(value !="a") { } else if(value=="b") { }