JSFiddle - React, Tailwind, and code Playground

JavaScript

var haveFreeHour = ["John", "Penny", "Pat"];
var name = prompt("What is the student name?");
if (haveFreeHour.indexOf(name) > -1) {
    console.log(name + " has one free hour of lessons.");
} else {
    console.log(name + " doesn't have any free lessons.");
}