Question: What does this JavaScript statement do ? let thiefType = ( goodDeeds > 1 0 && victimType = = = wealthy ) ? rascal :
What does this JavaScript statement dolet thiefType goodDeeds && victimType "wealthy" "rascal" : "brigand";aassigns the string"rascal brigand"to the variablethiefTypeb.assigns"rascal"tothiefTypeonly if the value ofgoodDeedsis greater than andvictimTypestores the string"wealthy"cassigns"rascal"tothiefTypeif the value ofgoodDeedsis greater than but assigns"brigand"tothiefTypeifvictimTypestores the string"wealthy"dassigns"rascal"tothiefTypeif either the value ofgoodDeedsis greater than orvictimTypestores the string"wealthy"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
