Vamos a aprender a implementar un Sistema de Examen en Línea con Javascript, esta aplicación no tiene una base de datos y por tal motivo tampoco requiere un servidor, es una página estática, que gracias a la lógica de Javascript, compara si las respuestas realizadas por el usuario final son correctas cada vez.
Si el número de respuestas es inferior a tres pierdes el examen, si es de 3 o 4 ganas y si coincides actualmente en las 5 preguntas actuales el sistema te felicita al final.
Demo del Sistema de Examen en Línea con Javascript
De la aplicación implementé un demo que puedes ver en el siguiente enlace:
Esta aplicación consta de dos archivos específicos en Javascript, uno llamado script.js donde se realizan los cálculos para que funcione el quiz, el otro archivo Javascript es question.js que es donde se configuran las preguntas, con un array llamado questions, con una variable que indica el orden de las preguntas llamada numb, otra variable que indica la pregunta que va a ser formulada llamada question, otra variable llamada answer donde se coloca la cadena de la respuesta correcta y otro array, dentro del array principal llamado options que es el que contiene las preguntas de selección multiple y la respuesta corecta, si el usuario elige la respuesta que coincide con la cadena que se encuentra en la variable question, entonces esa respuesta será la correcta.
Video Explicativo
Sistema de Examen en Línea con Javascript
Descarga he implementación del proyecto en JavaScript
El siguiente es el enlace del repositorio donde tengo el proyecto colgado en GitHub:
Como es una página estática, no se requiere utilizar un backend, no debes instalar ningún servidor basta con descargar el proyecto y ejecutar la página index.html
Subida del Sistema de Examen en Línea con Javascript a un hosting
Usamos cookies en nuestro sitio web para brindarle la experiencia más relevante recordando sus preferencias y visitas repetidas. Al hacer clic en "Aceptar", acepta el uso de TODAS las cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duración
Descripción
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.