Question: What does this JavaScript statement do ? let thiefType = ( goodDeeds > 1 0 && victimType = = = wealthy ) ? rascal :

What does this JavaScript statement do?let thiefType =(goodDeeds >10 && victimType === "wealthy")? "rascal" : "brigand";a.assigns the string"rascal brigand"to the variablethiefTypeb.assigns"rascal"tothiefTypeonly if the value ofgoodDeedsis greater than 10 andvictimTypestores the string"wealthy"c.assigns"rascal"tothiefTypeif the value ofgoodDeedsis greater than 10 but assigns"brigand"tothiefTypeifvictimTypestores the string"wealthy"d.assigns"rascal"tothiefTypeif either the value ofgoodDeedsis greater than 10 orvictimTypestores the string"wealthy"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!