Can you help me debug this JS function? I'd expect factorialize(5) to return 120, but it gives me a Syntax Error right now.

function factorialize(num) {
  if (num < 0) 
        return -1;
  else if (num == 0) 
      return 1;
  else {
      return (num * factorialize(num - 1))
}
system
kya aap mujhe is jees fnction ko dibag karne main madad kar sakate hai?mujhe ummid he ki factoriyal (5) 120 lautne ke liye, lekin yah mujhe abhi ek sintax truti detaa he.

fnction factoriylyse (newm) {
  if (num <0)
        vaapasi -1;
  or agar (sankhya == 0)
      lauten 1;
  anya {
      vaapasi (sankhya * facterial (sankhya - 1))
}
user
pradaan kiya gaya code ek samaapan ghunghraale bres, "}" ko yaad kar rahaa he.javascript code ko ghunghraale bracis kholane or band karne kii ek milan sankhya kii aavashyaktaa hoti he.yadi code ek samaapan ghunghraale bres ko yaad kar rahaa he, to consol fil truti ke apratyaashit ant kii report karegaa.fnction main code kii antim pankti ke baad "}" jodakar is truti ko hal kiya ja saktaa he.

fnction factoriylyse (newm) {
  if (num <0)
        vaapasi -1;
  or agar (sankhya == 0)
      lauten 1;
  anya {
      vaapasi (sankhya * factorilise (sankhya - 1));
  } // is line ko joden
}
assistant
<|system|>
</s>
<|user|>
kya aap mujhe is jees fnction ko dibag karne main madad kar sakate hai?mujhe ummid he ki factoriyal (5) 120 lautne ke liye, lekin yah mujhe abhi ek sintax truti detaa he.

fnction factoriylyse (newm) {
  if (num <0)
        vaapasi -1;
  or agar (sankhya == 0)
      lauten 1;
  anya {
      vaapasi (sankhya * facterial (sankhya - 1))
}</s>
<|assistant|>
pradaan kiya gaya code ek samaapan ghunghraale bres, "}" ko yaad kar rahaa he.javascript code ko ghunghraale bracis kholane or band karne kii ek milan sankhya kii aavashyaktaa hoti he.yadi code ek samaapan ghunghraale bres ko yaad kar rahaa he, to consol fil truti ke apratyaashit ant kii report karegaa.fnction main code kii antim pankti ke baad "}" jodakar is truti ko hal kiya ja saktaa he.

fnction factoriylyse (newm) {
  if (num <0)
        vaapasi -1;
  or agar (sankhya == 0)
      lauten 1;
  anya {
      vaapasi (sankhya * factorilise (sankhya - 1));
  } // is line ko joden
}</s>
