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();