const quizData = [
{
question: "What is the capital of Afghanistan?๐ฆ๐ซ",
options: ["Kabul", "Tehran", "Islamabad", "New Delhi"],
answer: 0
},
{
question: "What is the capital of Albania?๐ฆ๐ฑ",
options: ["Tirana", "Skopje", "Podgorica", "Belgrade"],
answer: 0
},
{
question: "What is the capital of Algeria?๐ฉ๐ฟ",
options: ["Cairo", "Algiers", "Tunis", "Rabat"],
answer: 1
},
{
question: "What is the capital of Andorra?๐ฆ๐ฉ",
options: ["Andorra la Vella", "Barcelona", "Madrid", "Lisbon"],
answer: 0
},
{
question: "What is the capital of Angola?๐ฆ๐ด",
options: ["Kinshasa", "Luanda", "Brazzaville", "Lusaka"],
answer: 1
},
{
question: "What is the capital of Antigua and Barbuda?๐ฆ๐ฌ",
options: ["Nassau", "Havana", "St. John's", "Kingston"],
answer: 2
},
{
question: "What is the capital of Argentina?๐ฆ๐ท",
options: ["Buenos Aires", "Santiago", "Lima", "Montevideo"],
answer: 0
},
{
question: "What is the capital of Armenia?๐ฆ๐ฒ",
options: ["Yerevan", "Baku", "Tbilisi", "Ankara"],
answer: 0
},
{
question: "What is the capital of Australia?๐ฆ๐บ",
options: ["Sydney", "Melbourne", "Canberra", "Auckland"],
answer: 2
},
{
question: "What is the capital of Austria?๐ฆ๐น",
options: ["Berlin", "Vienna", "Zurich", "Prague"],
answer: 1
},
{
question: "What is the capital of Azerbaijan?๐ฆ๐ฟ",
options: ["Astana", "Baku", "Ashgabat", "Yerevan"],
answer: 1
},
{
question: "What is the capital of Bahamas?๐ง๐ธ",
options: ["Kingston", "Havana", "Nassau", "Port-au-Prince"],
answer: 2
},
{
question: "What is the capital of Bahrain?๐ง๐ญ",
options: ["Kuwait City", "Doha", "Manama", "Muscat"],
answer: 2
},
{
question: "What is the capital of Bangladesh?๐ง๐ฉ",
options: ["Kathmandu", "Colombo", "Thimphu", "Dhaka"],
answer: 3
},
{
question: "What is the capital of Barbados?๐ง๐ง",
options: ["Georgetown", "Bridgetown", "Castries", "Port of Spain"],
answer: 1
},
{
question: "What is the capital of Belarus?๐ง๐พ",
options: ["Minsk", "Vilnius", "Riga", "Kiev"],
answer: 0
},
{
question: "What is the capital of Belgium?๐ง๐ช",
options: ["Luxembourg", "Brussels", "Amsterdam", "The Hague"],
answer: 1
},
{
question: "What is the capital of Belize?๐ง๐ฟ",
options: ["Belmopan", "Guatemala City", "Tegucigalpa", "San Salvador"],
answer: 0
},
{
question: "What is the capital of Benin?๐ง๐ฏ",
options: ["Lomรฉ", "Niamey", "Cotonou", "Accra"],
answer: 2
},
{
question: "What is the capital of Bhutan?๐ง๐น",
options: ["Thimphu", "Kathmandu", "Dhaka", "Delhi"],
answer: 0
},
{
question: "What is the capital of Bolivia?๐ง๐ด",
options: ["Quito", "Sucre", "La Paz", "Lima"],
answer: 2
},
{
question: "What is the capital of Bosnia and Herzegovina?๐ง๐ฆ",
options: ["Belgrade", "Skopje", "Podgorica", "Sarajevo"],
answer: 3
},
{
question: "What is the capital of Botswana?๐ง๐ผ",
options: ["Nairobi", "Pretoria", "Gaborone", "Windhoek"],
answer: 2
},
{
question: "What is the capital of Brazil?๐ง๐ท",
options: ["Sao Paulo", "Brasilia", "Rio de Janeiro", "Buenos Aires"],
answer: 1
},
{
question: "What is the capital of Brunei?๐ง๐ณ",
options: ["Bangkok", "Bandar Seri Begawan", "Jakarta", "Kuala Lumpur"],
answer: 1
},
{
question: "What is the capital of Bulgaria?๐ง๐ฌ",
options: ["Bucharest", "Belgrade", "Sofia", "Skopje"],
answer: 2
},
{
question: "What is the capital of Burkina Faso?๐ง๐ซ",
options: ["Conakry", "Abuja", "Bamako", "Ouagadougou"],
answer: 3
},
{
question: "What is the capital of Burundi?๐ง๐ฎ",
options: ["Kampala", "Bujumbura", "Nairobi", "Kigali"],
answer: 1
},
{
question: "What is the capital of Cabo Verde?๐จ๐ป",
options: ["Praia", "Dakar", "Banjul", "Conakry"],
answer: 0
},
{
question: "What is the capital of Cambodia?๐ฐ๐ญ",
options: ["Vientiane", "Hanoi", "Phnom Penh", "Bangkok"],
answer: 2
},
{
question: "What is the capital of Cameroon?๐จ๐ฒ",
options: ["Abuja", "Yaoundรฉ", "Brazzaville", "Kinshasa"],
answer: 1
},
{
question: "What is the capital of Canada?๐จ๐ฆ",
options: ["Toronto", "Ottawa", "Montreal", "Vancouver"],
answer: 1
},
{
question: "What is the capital of Central African Republic?๐จ๐ซ",
options: ["Brazzaville", "Yaoundรฉ", "N'Djamena", "Bangui"],
answer: 3
},
{
question: "What is the capital of Chad?๐น๐ฉ",
options: ["Bamako", "Niamey", "N'Djamena", "Brazzaville"],
answer: 2
},
{
question: "What is the capital of Chile?๐จ๐ฑ",
options: ["Buenos Aires", "Lima", "Santiago", "Montevideo"],
answer: 2
},
{
question: "What is the capital of China?๐จ๐ณ",
options: ["Beijing", "Shanghai", "Hong Kong", "Tokyo"],
answer: 0
},
{
question: "What is the capital of Colombia?๐จ๐ด",
options: ["Bogota", "Lima", "Quito", "Caracas"],
answer: 0
},
{
question: "What is the capital of Comoros?๐ฐ๐ฒ",
options: ["Victoria", "Antananarivo", "Moroni", "Nairobi"],
answer: 2
},
{
question: "What is the capital of Congo (Brazzaville)?๐จ๐ฉ",
options: ["Luanda", "Brazzaville", "Kinshasa", "Yaoundรฉ"],
answer: 1
},
{
question: "What is the capital of Congo (Kinshasa)?๐จ๐ฌ",
options: ["Kinshasa", "Brazzaville", "Kigali", "Lusaka"],
answer: 0
},
{
question: "What is the capital of Costa Rica?๐จ๐ท",
options: ["Managua", "Panama City", "San Jose", "San Salvador"],
answer: 2
},
{
question: "What is the capital of Cote d'Ivoire?๐จ๐ฎ",
options: ["Bamako", "Accra", "Abidjan", "Dakar"],
answer: 2
},
{
question: "What is the capital of Croatia?๐ญ๐ท",
options: ["Ljubljana", "Zagreb", "Belgrade", "Sarajevo"],
answer: 1
},
{
question: "What is the capital of Cuba?๐จ๐บ",
options: ["Havana", "San Juan", "Santo Domingo", "Kingston"],
answer: 0
},
{
question: "What is the capital of Cyprus?๐จ๐พ",
options: ["Nicosia", "Athens", "Ankara", "Beirut"],
answer: 0
},
{
question: "What is the capital of Czech Republic?๐จ๐ฟ",
options: ["Budapest", "Vienna", "Prague", "Warsaw"],
answer: 2
},
{
question: "What is the capital of Denmark?๐ฉ๐ฐ",
options: ["Helsinki", "Stockholm", "Copenhagen", "Oslo"],
answer: 2
},
{
question: "What is the capital of Djibouti?๐ฉ๐ฏ",
options: ["Khartoum", "Mogadishu", "Nairobi", "Djibouti"],
answer: 3
},
{
question: "What is the capital of Dominica?๐ฉ๐ฒ",
options: ["Castries", "Bridgetown", "Roseau", "Port of Spain"],
answer: 2
},
{
question: "What is the capital of Dominican Republic?๐ฉ๐ด",
options: ["Havana", "San Juan", "Santo Domingo", "Kingston"],
answer: 2
},
{
question: "What is the capital of East Timor?๐น๐ฑ",
options: ["Dili", "Jakarta", "Manila", "Singapore"],
answer: 0
},
{
question: "What is the capital of Ecuador?๐ช๐จ",
options: ["Lima", "Quito", "Bogota", "Caracas"],
answer: 1
},
{
question: "What is the capital of Egypt?๐ช๐ฌ",
options: ["Cairo", "Nairobi", "Riyadh", "Athens"],
answer: 0
},
{
question: "What is the capital of El Salvador?๐ธ๐ป",
options: ["Tegucigalpa", "Managua", "San Salvador", "Guatemala City"],
answer: 2
},
{
question: "What is the capital of Equatorial Guinea?๐ฌ๐ถ",
options: ["Malabo", "Libreville", "Brazzaville", "Yaoundรฉ"],
answer: 0
},
{
question: "What is the capital of Eritrea?๐ช๐ท",
options: ["Khartoum", "Asmara", "Addis Ababa", "Nairobi"],
answer: 1
},
{
question: "What is the capital of Estonia?๐ช๐ช",
options: ["Helsinki", "Riga", "Tallinn", "Vilnius"],
answer: 2
},
{
question: "What is the capital of Eswatini (Swaziland)?๐ธ๐ฟ",
options: ["Maseru", "Gaborone", "Mbabane", "Harare"],
answer: 2
},
{
question: "What is the capital of Ethiopia?๐ช๐น",
options: ["Nairobi", "Khartoum", "Addis Ababa", "Kigali"],
answer: 2
},
{
question: "What is the capital of Fiji?๐ซ๐ฏ",
options: ["Suva", "Port Moresby", "Wellington", "Canberra"],
answer: 0
},
{
question: "What is the capital of Finland?๐ซ๐ฎ",
options: ["Reykjavik", "Helsinki", "Stockholm", "Oslo"],
answer: 1
},
{
question: "What is the capital of France? ๐ซ๐ท",
options: ["London", "Paris", "Berlin", "Madrid"],
answer: 1
},
{
question: "What is the capital of Gabon?๐ฌ๐ฆ",
options: ["Douala", "Brazzaville", "Yaoundรฉ", "Libreville"],
answer: 3
},
{
question: "What is the capital of Gambia?๐ฌ๐ฒ",
options: ["Bamako", "Dakar", "Banjul", "Accra"],
answer: 2
},
{
question: "What is the capital of Georgia?๐ฌ๐ช",
options: ["Yerevan", "Tbilisi", "Baku", "Ankara"],
answer: 1
},
{
question: "What is the capital of Germany?๐ฉ๐ช",
options: ["Berlin", "Vienna", "Paris", "Amsterdam"],
answer: 0
},
{
question: "What is the capital of Ghana?๐ฌ๐ญ",
options: ["Abuja", "Accra", "Dakar", "Lomรฉ"],
answer: 1
},
{
question: "What is the capital of Greece?๐ฌ๐ท",
options: ["Athens", "Nicosia", "Rome", "Sofia"],
answer: 0
},
{
question: "What is the capital of Grenada?๐ฌ๐ฉ",
options: ["Kingstown", "St. John's", "Port of Spain", "St. George's"],
answer: 3
},
{
question: "What is the capital of Guatemala?๐ฌ๐น",
options: ["Panama City", "San Salvador", "Tegucigalpa", "Guatemala City"],
answer: 3
},
{
question: "What is the capital of Guinea?๐ฌ๐ณ",
options: ["Conakry", "Bissau", "Dakar", "Freetown"],
answer: 0
},
{
question: "What is the capital of Guinea-Bissau?๐ฌ๐ผ",
options: ["Bamako", "Dakar", "Banjul", "Bissau"],
answer: 3
},
{
question: "What is the capital of Guyana?๐ฌ๐พ",
options: ["Georgetown", "Paramaribo", "Port of Spain", "Bridgetown"],
answer: 0
},
{
question: "What is the capital of Haiti?๐ญ๐น",
options: ["Port-au-Prince", "Santo Domingo", "Havana", "Kingston"],
answer: 0
},
{
question: "What is the capital of Honduras?๐ญ๐ณ",
options: ["Tegucigalpa", "Managua", "San Salvador", "Guatemala City"],
answer: 0
},
{
question: "What is the capital of Hungary?๐ญ๐บ",
options: ["Sofia", "Vienna", "Budapest", "Prague"],
answer: 2
},
{
question: "What is the capital of Iceland?๐ฎ๐ธ",
options: ["Helsinki", "Reykjavik", "Stockholm", "Oslo"],
answer: 1
},
{
question: "What is the capital of India?๐ฎ๐ณ",
options: ["Delhi", "Mumbai", "Kolkata", "Bangalore"],
answer: 0
},
{
question: "What is the capital of Indonesia?๐ฎ๐ฉ",
options: ["Bangkok", "Jakarta", "Manila", "Kuala Lumpur"],
answer: 1
},
{
question: "What is the capital of Iran?๐ฎ๐ท",
options: ["Riyadh", "Baghdad", "Tehran", "Damascus"],
answer: 2
},
{
question: "What is the capital of Iraq?๐ฎ๐ถ",
options: ["Tehran", "Baghdad", "Riyadh", "Amman"],
answer: 1
},
{
question: "What is the capital of Ireland?๐ฎ๐ช",
options: ["Dublin", "Belfast", "Edinburgh", "Cardiff"],
answer: 0
},
{
question: "What is the capital of Israel?๐ฎ๐ฑ",
options: ["Jerusalem", "Tel Aviv", "Cairo", "Amman"],
answer: 0
},
{
question: "What is the capital of Italy?๐ฎ๐น",
options: ["Rome", "Paris", "Athens", "Madrid"],
answer: 0
},
{
question: "What is the capital of Jamaica?๐ฏ๐ฒ",
options: ["Kingston", "Havana", "San Juan", "Port-au-Prince"],
answer: 0
},
{
question: "What is the capital of Japan?๐ฏ๐ต",
options: ["Beijing", "Tokyo", "Seoul", "Jakarta"],
answer: 1
},
{
question: "What is the capital of Jordan?๐ฏ๐ด",
options: ["Cairo", "Damascus", "Amman", "Riyadh"],
answer: 2
},
{
question: "What is the capital of Kazakhstan?๐ฐ๐ฟ",
options: ["Tashkent", "Almaty", "Nur-Sultan", "Bishkek"],
answer: 2
},
{
question: "What is the capital of Kenya?๐ฐ๐ช",
options: ["Kampala", "Bujumbura", "Nairobi", "Kigali"],
answer: 2
},
{
question: "What is the capital of Kiribati?๐ฐ๐ฎ",
options: ["Apia", "Nuku'alofa", "Suva", "Tarawa"],
answer: 3
},
{
question: "What is the capital of Kuwait?๐ฐ๐ผ",
options: ["Doha", "Muscat", "Riyadh", "Kuwait City"],
answer: 3
},
{
question: "What is the capital of Kyrgyzstan?๐ฐ๐ฌ",
options: ["Tashkent", "Almaty", "Nur-Sultan", "Bishkek"],
answer: 3
},
{
question: "What is the capital of Laos?๐ฑ๐ฆ",
options: ["Hanoi", "Bangkok", "Vientiane", "Phnom Penh"],
answer: 2
},
{
question: "What is the capital of Latvia?๐ฑ๐ป",
options: ["Vilnius", "Riga", "Tallinn", "Helsinki"],
answer: 1
},
{
question: "What is the capital of Lebanon?๐ฑ๐ง",
options: ["Beirut", "Damascus", "Amman", "Cairo"],
answer: 0
},
{
question: "What is the capital of Lesotho?๐ฑ๐ธ",
options: ["Pretoria", "Maseru", "Gaborone", "Harare"],
answer: 1
},
{
question: "What is the capital of Liberia?๐ฑ๐ท",
options: ["Accra", "Dakar", "Monrovia", "Freetown"],
answer: 2
},
{
question: "What is the capital of Libya?๐ฑ๐พ",
options: ["Tripoli", "Cairo", "Tunis", "Algiers"],
answer: 0
},
{
question: "What is the capital of Liechtenstein?๐ฑ๐ฎ",
options: ["Bern", "Luxembourg City", "Vienna", "Vaduz"],
answer: 3
},
{
question: "What is the capital of Lithuania?๐ฑ๐น",
options: ["Vilnius", "Riga", "Tallinn", "Helsinki"],
answer: 0
},
{
question: "What is the capital of Luxembourg?๐ฑ๐บ",
options: ["Brussels", "Strasbourg", "Amsterdam", "Luxembourg City"],
answer: 3
},
{
question: "What is the capital of Madagascar?๐ฒ๐ฌ",
options: ["Antananarivo", "Maputo", "Nairobi", "Maseru"],
answer: 0
},
{
question: "What is the capital of Malawi?๐ฒ๐ผ",
options: ["Lilongwe", "Lusaka", "Harare", "Windhoek"],
answer: 0
},
{
question: "What is the capital of Malaysia?๐ฒ๐พ",
options: ["Bangkok", "Jakarta", "Manila", "Kuala Lumpur"],
answer: 3
},
{
question: "What is the capital of Maldives?๐ฒ๐ป",
options: ["Male", "Colombo", "Dhaka", "Thimphu"],
answer: 0
},
{
question: "What is the capital of Mali?๐ฒ๐ฑ",
options: ["Dakar", "Banjul", "Bamako", "Accra"],
answer: 2
},
{
question: "What is the capital of Malta?๐ฒ๐น",
options: ["Rome", "Valletta", "Athens", "Nicosia"],
answer: 1
},
{
question: "What is the capital of Marshall Islands?๐ฒ๐ญ",
options: ["Suva", "Majuro", "Palikir", "Apia"],
answer: 1
},
{
question: "What is the capital of Mauritania?๐ฒ๐ท",
options: ["Dakar", "Nouakchott", "Bissau", "Conakry"],
answer: 1
},
{
question: "What is the capital of Mauritius?๐ฒ๐บ",
options: ["Port Louis", "Victoria", "Antananarivo", "Moroni"],
answer: 0
},
{
question: "What is the capital of Mexico?๐ฒ๐ฝ",
options: ["Lima", "Bogota", "Mexico City", "Santiago"],
answer: 2
},
{
question: "What is the capital of Micronesia?๐ซ๐ฒ",
options: ["Port Moresby", "Nauru", "Palikir", "Majuro"],
answer: 2
},
{
question: "What is the capital of Moldova?๐ฒ๐ฉ",
options: ["Tirana", "Belgrade", "Chisinau", "Kiev"],
answer: 2
},
{
question: "What is the capital of Monaco?๐ฒ๐จ",
options: ["Nice", "Marseille", "Monte Carlo", "Monaco"],
answer: 2
},
{
question: "What is the capital of Mongolia?๐ฒ๐ณ",
options: ["Ulaanbaatar", "Astana", "Bishkek", "Tashkent"],
answer: 0
},
{
question: "What is the capital of Montenegro?๐ฒ๐ช",
options: ["Podgorica", "Tirana", "Belgrade", "Skopje"],
answer: 0
},
{
question: "What is the capital of Morocco?๐ฒ๐ฆ",
options: ["Algiers", "Cairo", "Tunis", "Rabat"],
answer: 3
},
{
question: "What is the capital of Mozambique?๐ฒ๐ฟ",
options: ["Luanda", "Harare", "Lusaka", "Maputo"],
answer: 3
},
{
question: "What is the capital of Myanmar (Burma)?๐ฒ๐ฒ",
options: ["Vientiane", "Bangkok", "Naypyidaw", "Jakarta"],
answer: 2
},
{
question: "What is the capital of Namibia?๐ณ๐ฆ",
options: ["Pretoria", "Lusaka", "Harare", "Windhoek"],
answer: 3
},
{
question: "What is the capital of Nauru?๐ณ๐ท",
options: ["Suva", "Majuro", "Palikir", "Yaren"],
answer: 3
},
{
question: "What is the capital of Nepal?๐ณ๐ต",
options: ["Kathmandu", "Dhaka", "New Delhi", "Colombo"],
answer: 0
},
{
question: "What is the capital of Netherlands?๐ณ๐ฑ",
options: ["Brussels", "Strasbourg", "Amsterdam", "The Hague"],
answer: 2
},
{
question: "What is the capital of New Zealand?๐ณ๐ฟ",
options: ["Wellington", "Sydney", "Auckland", "Canberra"],
answer: 0
},
{
question: "What is the capital of Nicaragua?๐ณ๐ฎ",
options: ["San Jose", "San Salvador", "Managua", "Tegucigalpa"],
answer: 2
},
{
question: "What is the capital of Niger?๐ณ๐ช",
options: ["Lome", "Niamey", "Ouagadougou", "N'Djamena"],
answer: 1
},
{
question: "What is the capital of Nigeria?๐ณ๐ฌ",
options: ["Abuja", "Lagos", "Accra", "Dakar"],
answer: 0
},
{
question: "What is the capital of North Macedonia?๐ฒ๐ฐ",
options: ["Skopje", "Tirana", "Belgrade", "Podgorica"],
answer: 0
},
{
question: "What is the capital of Norway?๐ณ๐ด",
options: ["Copenhagen", "Stockholm", "Helsinki", "Oslo"],
answer: 3
},
{
question: "What is the capital of Oman?๐ด๐ฒ",
options: ["Muscat", "Doha", "Riyadh", "Manama"],
answer: 0
},
{
question: "What is the capital of Pakistan?๐ต๐ฐ",
options: ["Islamabad", "Lahore", "Karachi", "Kabul"],
answer: 0
},
{
question: "What is the capital of Palau?๐ต๐ผ",
options: ["Port Moresby", "Nauru", "Melekeok", "Apia"],
answer: 2
},
{
question: "What is the capital of Panama?๐ต๐ฆ",
options: ["Santo Domingo", "San Juan", "San Salvador", "Panama City"],
answer: 3
},
{
question: "What is the capital of Papua New Guinea?๐ต๐ฌ",
options: ["Port Moresby", "Suva", "Honiara", "Noumea"],
answer: 0
},
{
question: "What is the capital of Paraguay?๐ต๐พ",
options: ["Buenos Aires", "Asuncion", "Montevideo", "Santiago"],
answer: 1
},
{
question: "What is the capital of Peru?๐ต๐ช",
options: ["Bogota", "Quito", "Lima", "La Paz"],
answer: 2
},
{
question: "What is the capital of Philippines?๐ต๐ญ",
options: ["Bangkok", "Jakarta", "Manila", "Kuala Lumpur"],
answer: 2
},
{
question: "What is the capital of Poland?๐ต๐ฑ",
options: ["Budapest", "Prague", "Warsaw", "Vienna"],
answer: 2
},
{
question: "What is the capital of Portugal?๐ต๐น",
options: ["Madrid", "Lisbon", "Barcelona", "Rome"],
answer: 1
},
{
question: "What is the capital of Qatar?๐ถ๐ฆ",
options: ["Muscat", "Doha", "Riyadh", "Manama"],
answer: 1
},
{
question: "What is the capital of Romania?๐ท๐ด",
options: ["Sofia", "Bucharest", "Belgrade", "Kiev"],
answer: 1
},
{
question: "What is the capital of Russia?๐ท๐บ",
options: ["Moscow", "St. Petersburg", "Kiev", "Astana"],
answer: 0
},
{
question: "What is the capital of Rwanda?๐ท๐ผ",
options: ["Nairobi", "Kampala", "Kigali", "Bujumbura"],
answer: 2
},
{
question: "What is the capital of Kosovo?๐ฝ๐ฐ",
options: ["Moscow", "Belgrad", "Sarajevo", "Pristina"],
answer: 3
},
{
question: "What is the capital of Saint Kitts and Nevis?๐ฐ๐ณ",
options: ["Castries", "Bridgetown", "Basseterre", "Kingstown"],
answer: 2
},
{
question: "What is the capital of Saint Lucia?๐ฑ๐จ",
options: ["Castries", "Bridgetown", "Basseterre", "Kingstown"],
answer: 0
},
{
question: "What is the capital of Saint Vincent and the Grenadines?๐ป๐จ",
options: ["Castries", "Bridgetown", "Basseterre", "Kingstown"],
answer: 3
},
{
question: "What is the capital of Samoa?๐ผ๐ธ",
options: ["Apia", "Nuku'alofa", "Suva", "Tarawa"],
answer: 0
},
{
question: "What is the capital of San Marino?๐ธ๐ฒ",
options: ["Vatican City", "Rome", "Valletta", "San Marino"],
answer: 3
},
{
question: "What is the capital of Sao Tome and Principe?๐ธ๐น",
options: ["Luanda", "Praia", "Sao Tome", "Malabo"],
answer: 2
},
{
question: "What is the capital of Saudi Arabia?๐ธ๐ฆ",
options: ["Muscat", "Doha", "Riyadh", "Manama"],
answer: 2
},
{
question: "What is the capital of Senegal?๐ธ๐ณ",
options: ["Dakar", "Banjul", "Bamako", "Accra"],
answer: 0
},
{
question: "What is the capital of Serbia?๐ท๐ธ",
options: ["Podgorica", "Tirana", "Belgrad", "Skopje"],
answer: 2
},
{
question: "What is the capital of Seychelles?๐ธ๐จ",
options: ["Victoria", "Port Louis", "Antananarivo", "Moroni"],
answer: 0
},
{
question: "What is the capital of Sierra Leone?๐ธ๐ฑ",
options: ["Abuja", "Monrovia", "Freetown", "Dakar"],
answer: 2
},
{
question: "What is the capital of Singapore?๐ธ๐ฌ",
options: ["Bangkok", "Jakarta", "Manila", "Singapore City"],
answer: 3
},
{
question: "What is the capital of Slovakia?๐ธ๐ฐ",
options: ["Budapest", "Prague", "Warsaw", "Bratislava"],
answer: 3
},
{
question: "What is the capital of Slovenia?๐ธ๐ฎ",
options: ["Zagreb", "Ljubljana", "Vienna", "Belgrade"],
answer: 1
},
{
question: "What is the capital of Solomon Islands?๐ธ๐ง",
options: ["Port Moresby", "Suva", "Honiara", "Noumea"],
answer: 2
},
{
question: "What is the capital of Somalia?๐ธ๐ด",
options: ["Nairobi", "Kampala", "Mogadishu", "Djibouti"],
answer: 2
},
{
question: "What is the capital of South Africa?๐ฟ๐ฆ",
options: ["Pretoria", "Cape Town", "Johannesburg", "Durban"],
answer: 0
},
{
question: "What is the capital of South Sudan?๐ธ๐ธ",
options: ["Kampala", "Nairobi", "Juba", "Addis Ababa"],
answer: 2
},
{
question: "What is the capital of Spain?๐ช๐ธ",
options: ["Lisbon", "Madrid", "Barcelona", "Rome"],
answer: 1
},
{
question: "What is the capital of Sri Lanka?๐ฑ๐ฐ",
options: ["Male", "Dhaka", "New Delhi", "Colombo"],
answer: 3
},
{
question: "What is the capital of Sudan?๐ธ๐ฉ",
options: ["Cairo", "Khartoum", "Nairobi", "Riyadh"],
answer: 1
},
{
question: "What is the capital of Suriname?๐ธ๐ท",
options: ["Paramaribo", "Georgetown", "Cayenne", "Brasilia"],
answer: 0
},
{
question: "What is the capital of Sweden?๐ธ๐ช",
options: ["Copenhagen", "Stockholm", "Helsinki", "Oslo"],
answer: 1
},
{
question: "What is the capital of Switzerland?๐จ๐ญ",
options: ["Bern", "Vienna", "Zurich", "Geneva"],
answer: 0
},
{
question: "What is the capital of Syria?๐ธ๐พ",
options: ["Baghdad", "Damascus", "Amman", "Beirut"],
answer: 1
},
{
question: "What is the capital of Tajikistan?๐น๐ฏ",
options: ["Kabul", "Tashkent", "Dushanbe", "Bishkek"],
answer: 2
},
{
question: "What is the capital of Tanzania?๐น๐ฟ",
options: ["Nairobi", "Kampala", "Dodoma", "Lusaka"],
answer: 2
},
{
question: "What is the capital of Thailand๐น๐ญ?",
options: ["Bangkok", "Jakarta", "Manila", "Kuala Lumpur"],
answer: 0
},
{
question: "What is the capital of Timor-Leste?๐น๐ฑ",
options: ["Dili", "Jayapura", "Port Moresby", "Suva"],
answer: 0
},
{
question: "What is the capital of Togo?๐น๐ฌ",
options: ["Lome", "Niamey", "Ouagadougou", "N'Djamena"],
answer: 0
},
{
question: "What is the capital of Tonga?๐น๐ด",
options: ["Apia", "Nuku'alofa", "Suva", "Tarawa"],
answer: 1
},
{
question: "What is the capital of Trinidad and Tobago?๐น๐น",
options: ["Bridgetown", "Kingston", "Port of Spain", "Castries"],
answer: 2
},
{
question: "What is the capital of Tunisia?๐น๐ณ",
options: ["Algiers", "Cairo", "Tunis", "Rabat"],
answer: 2
},
{
question: "What is the capital of Turkey?๐น๐ท",
options: ["Ankara", "Istanbul", "Athens", "Tbilisi"],
answer: 0
},
{
question: "What is the capital of Turkmenistan?๐น๐ฒ",
options: ["Kabul", "Tashkent", "Dushanbe", "Ashgabat"],
answer: 3
},
{
question: "What is the capital of Tuvalu?๐น๐ป",
options: ["Port Moresby", "Nauru", "Funafuti", "Apia"],
answer: 2
},
{
question: "What is the capital of Uganda?๐บ๐ฌ",
options: ["Nairobi", "Kampala", "Kigali", "Bujumbura"],
answer: 1
},
{
question: "What is the capital of Ukraine?๐บ๐ฆ",
options: ["Sofia", "Bucharest", "Belgrade", "Kiev"],
answer: 3
},
{
question: "What is the capital of United Arab Emirates?๐ฆ๐ช",
options: ["Muscat", "Doha", "Riyadh", "Abu Dhabi"],
answer: 3
},
{
question: "What is the capital of United Kingdom?๐ฌ๐ง",
options: ["London", "Manchester", "Birmingham", "Glasgow"],
answer: 0
},
{
question: "What is the capital of United States?๐บ๐ธ",
options: ["New York City", "Washington D.C.", "Los Angeles", "Chicago"],
answer: 1
},
{
question: "What is the capital of Uruguay?๐บ๐พ",
options: ["Buenos Aires", "Asuncion", "Montevideo", "Santiago"],
answer: 2
},
{
question: "What is the capital of Uzbekistan?๐บ๐ฟ",
options: ["Astana", "Tashkent", "Dushanbe", "Bishkek"],
answer: 1
},
{
question: "What is the capital of Vanuatu?๐ป๐บ",
options: ["Port Moresby", "Suva", "Port Vila", "Honiara"],
answer: 2
},
{
question: "What is the capital of Vatican City?๐ป๐ฆ",
options: ["Rome", "Vatican City", "Valletta", "San Marino"],
answer: 1
},
{
question: "What is the capital of Venezuela?๐ป๐ช",
options: ["Bogota", "Quito", "Caracas", "Georgetown"],
answer: 2
},
{
question: "What is the capital of Vietnam?๐ป๐ณ",
options: ["Bangkok", "Hanoi", "Ho Chi Minh City", "Phnom Penh"],
answer: 1
},
{
question: "What is the capital of Yemen?๐พ๐ช",
options: ["Sana'a", "Muscat", "Riyadh", "Aden"],
answer: 0
},
{
question: "What is the capital of Zambia?๐ฟ๐ฒ",
options: ["Nairobi", "Kampala", "Lusaka", "Harare"],
answer: 2
},
{
question: "What is the capital of Zimbabwe?๐ฟ๐ผ",
options: ["Pretoria", "Harare", "Windhoek", "Gaborone"],
answer: 1
},
{
question: "What is the capital of Taiwan?๐น๐ผ",
options: ["Xinbei", "Baotou", "Changhua", "Taipeh"],
answer: 3
},
{
question: "What is the capital of North Korea?๐ฐ๐ต",
options: ["Pyongyang", "Kaechon", "Beijing", "Tokyo"],
answer: 0
},
{
question: "What is the capital of South Korea?๐ฐ๐ท",
options: ["Busan", "Daejeon", "Seoul", "Beijing"],
answer: 2
},
];
const questionElement = document.getElementById("question");
const optionsContainer = document.getElementById("options-container");
const options = optionsContainer.getElementsByClassName("option");
const submitButton = document.getElementById("submit-btn");
const resultElement = document.getElementById("result");
let currentQuestion = 0;
let score = 0;
let questionsAsked = 0;
let shuffledQuizData = ([]);
function shuffleArray(array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
}
function loadQuestion() {
if (shuffledQuizData.length === 0) {
shuffledQuizData = shuffleArray([...quizData]);
}
const currentQuizData = shuffledQuizData[currentQuestion];
questionElement.innerText = currentQuizData.question;
for (let i = 0; i < options.length; i++) {
options[i].innerText = currentQuizData.options[i];
options[i].classList.remove("correct", "wrong");
}
}
function selectOption() {
for (let i = 0; i < options.length; i++) {
options[i].addEventListener("click", function () {
for (let j = 0; j < options.length; j++) {
options[j].classList.remove("selected");
}
this.classList.add("selected");
});
}
}
function checkAnswer() {
const selectedOption = optionsContainer.querySelector(".selected");
if (!selectedOption) {
return; // No option selected
}
const selectedAnswer = Array.from(options).indexOf(selectedOption);
const currentQuizData = shuffledQuizData[currentQuestion];
if (selectedAnswer === currentQuizData.answer) {
score++;
selectedOption.classList.add("correct");
} else {
selectedOption.classList.add("wrong");
const correctOption = options[currentQuizData.answer];
correctOption.classList.add("correct");
}
const selectedChoice = currentQuizData.options[selectedAnswer];
const correctChoice = currentQuizData.options[currentQuizData.answer];
resultElement.innerHTML += `Question ${currentQuestion + 1}: ${currentQuizData.question}
`;
resultElement.innerHTML += `Your Answer: ${selectedChoice}
`;
resultElement.innerHTML += `Correct Answer: ${correctChoice}
`;
currentQuestion++;
questionsAsked++;
selectedOption.classList.remove("selected");
if (currentQuestion < shuffledQuizData.length) {
loadQuestion();
} else {
showResult();
}
showCorrectTotal();
}
function showResult() {
questionElement.style.display = "none";
optionsContainer.style.display = "none";
submitButton.style.display = "none";
let resultHTML = `Your score: ${score} out of ${questionsAsked}
`;
resultHTML += "Selected Choices:
";
for (let i = 0; i < quizData.length; i++) {
const currentQuizData = quizData[i];
resultHTML += `Question ${i + 1}: ${currentQuizData.question}
`;
resultHTML += `Your Answer: ${currentQuizData.options[currentQuizData.answer]}
`;
}
resultElement.innerHTML = resultHTML;
}
function showCorrectTotal() {
const correctTotalElement = document.getElementById("correct-total");
correctTotalElement.innerHTML = `Correct/Total questions asked: ${score}/${questionsAsked}`;
}
loadQuestion();
function selectOption() {
for (let i = 0; i < options.length; i++) {
options[i].addEventListener("click", function () {
for (let j = 0; j < options.length; j++) {
options[j].classList.remove("selected");
}
this.classList.add("selected");
checkAnswer(); // Automatically check the answer when an option is selected
loadNextQuestion(); // Load the next question after the answer is checked
});
}
}
function loadNextQuestion() {
setTimeout(() => {
if (currentQuestion < shuffledQuizData.length) {
loadQuestion();
} else {
showQuizResult();
}
}, 1500); // Delay for 1.5 seconds before loading the next question or showing the result
}
submitButton.removeEventListener("click", checkAnswer); // Remove the click event listener from the submit button
loadQuestion();
selectOption();
showCorrectTotal();