DEV Community

huberto_madalena
huberto_madalena

Posted on

simple quiz in javascript

<!DOCTYPE html>


quiz

q1. 2+3?

5

8

10

9

q2. 3+3?

6

8

10

9

q3. 2+1?

3

8

10

9

function result()
{
var score =0;
if (document.getElementById('correct1').checked)
{
score++;
}

if (document.getElementById('correct2').checked)
{
score++;
}

if (document.getElementById('correct3').checked)
{
score++;
}

alert("your score is: " +score);

}

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git