JSFiddle - React, Tailwind, and code Playground

JavaScript

var firstName = prompt("What's your name?");
var firstNameLength = firstName.length;
var message = "There are " + firstNameLength + " characters in your name. " + firstName + "'s name is beautiful.";

console.log(firstName);


if (firstName == "null") {
	document.write("<p>You did not enter your name.</p>");
} else {
	document.write("<p>" + message + "</p>");
}