What is wrong with my code


this is not for codeacademy but its for my school assessment gcse 20%
i need to create a program that flips a coin, here is my code but i doesnt work can anybody help
var userChoice = prompt("would you like to flip a coin")


userChoice = "yes"

var userChoice ===  Math.random();

else if
       (userChoice < 0.5)
return("the coin is heads")
   (userChoice>= 0.5 )
      return ("the coin is tails");


okay so lets correct it step by step. The first correct to make is your if else blocks
remember this is the syntax if else block is written

    //do something
else if(some_other_condition){
    //do something else
    //do another thing

use this to correct your logic and lets keep going