Question: this has to be done in javascript determineWinner(user selection, cpuSelection) This function will take 2 parameters user Selection and cpuSelection and will return one of

this has to be done in javascript

this has to be done in javascript determineWinner(user selection, cpuSelection) This function

determineWinner(user selection, cpuSelection) This function will take 2 parameters user Selection and cpuSelection and will return one of the following values (win, lose , tie ). it would return (tie) if the user selection is the same as the cpu random selection. it would return (win) if: user selection is rock and cpu selection is scissors OR . user selection is paper and cpu selection is rock OR user selection is scissors and cpu selection is paper it would return (lose) in any other case

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 Databases Questions!