JSFiddle - React, Tailwind, and code Playground

by rachelmc_

HTML

<div id='candidate'>
    <h3 id='app'>
      Transportation Planner
    </h3>
    <p>
    Name
    </p>
    <input type="text" size="30" id="name">
     <p>
    Degree
    </p>
    <input type="text" size="30" id="degree">
     <p>
    School
    </p>
    <input type="text" size="30" id="school">
     <p>
    Years of Experience
    </p>
    <input type="text" size="30" id="exp">
</div>
<button onclick="weeder()">Click Me</button>
<p id="match"></p>

JavaScript

//A real-ish example of loops!

//Imagine you're a recruiter and you're looking through several online applications to find a great candidate to interview. Your company is very big and popular, so you have thousands of applications for just a handful of positions.
//That's a lot of reading through resumes! A bit too much work for one person. BUT! You have certain criteria that needs to be met in order to move people thorugh the application process. Instead of wasting our time sifting through applications to see if they meet the bare mini,u,, we can use loops!

//A loop is a way to run the same code over and over again but each time with a different value
//
//Let's walk through our application weeding process using a loop!
// 
//
//first we make a variable to hold our applicant's information. 
 		
	

function weeder() {
		var name = document.getElementById("name").value;
    var degree = document.getElementById("degree").value;
    var school = document.getElementById("school").value;
    var exp = document.getElementById("exp").value;
    if (exp > 5) {
    document.getElementById("match").innerHTML = "You are our ideal candidate!";
    }else{
    document.getElementById("match").innerHTML = "Sorry, you do not meet the qualifications";  
}
}