Kindly correct for me..I am a beginner


#1

function winner(team, goals){
if (goals >= 3){
document.write(team + " wins the Champions League");
}
else if (goals = 3){
document.write(team + " plays penalty kicks");
}
else (goals < 3){
document.write(team + " will be banned ever");
}
winner ("madrid", 8);


#2

= Assignment operator sets value to a variable.

=== Equality operator compares two values.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.