ما هو حل مشكلة SyntaxError: Unexpected token 'else' ؟
الكود التالي لا يعمل:
var experience; var maried; write("Enter years of experience: "); experience = read(); write("Are you married (yes/no): "); maried = read(); if (experience >= 1) { if (maried == "yes") { write("accept 100"); } else if (maried == "no"); { write("accept 80"); } else { write("Error: your answer can be 'yes' or 'no' only"); } }
يظهر لي الخطأ التالي عند الشتغيل:
SyntaxError: Unexpected token 'else'