0
Well, the idea was the following: make a simple function that computes the value inserted in an input and return the result to the user, but if the value entered is zero, the message that returns is: "Blank value!" ; (Because the " when converted to number becomes zero). In short, is there a way that it works there or I’ll have to rewrite in another way.
function inp() {
var num = Number(input.value);
var myNum = (num == " ");
if (Number.isNaN(num) == true) {
alert("Formato Inválido!");
} else if (myNum === true) {
alert("Valor em branco!")
} else {
alert((50 + 50 + 50) * num);
}
}
num === " "
– Jéf Bueno
Related: What is the difference between the operators == and == in Javascript?
– Jéf Bueno