I am new to Javascript and after finishing lesson 26 i tried this for fun.
Why wont it run?
confirm(“Hello I am here to know many things about you”);
var hisname = prompt(“Just tell me your name”);
var hisage = prompt(“And your age”);
var hisheight = prompt (“And your height”);
var hisweight = prompt (“And your weight”);
var itsgender = prompt (“And your gender”);
var all = hisname.length + hisage.length + hisheight.length + hisweight.length + itsgender.length;
if itsgender.length > 0
{
confirm(“Are you ready to be amazed?”)
}
console.log(“I know that your name is " + hisname”);
console.log(“It has a length of " + hisname.length + " (the name)”);
console.log("I also know that your grandfather’s name was propably " + hisname);
if all > 25
{
console.log(“you are also bullshiting me”);
}
if all < 10
{
console.log(“you are also bullshiting me”);
}
if all > 15 && < 24
{
console.log(“TA-DAAAAA”);
}
confirm(“Hello I am here to know many things about you”);
var hisname = prompt(“Just tell me your name”);
var hisage = prompt(“And your age”);
var hisheight = prompt (“And your height”);
var hisweight = prompt (“And your weight”);
var itsgender = prompt (“And your gender”);
var all = hisname.length + hisage.length + hisheight.length + hisweight.length + itsgender.length;
if (itsgender.length > 0)
{
confirm(“Are you ready to be amazed?”)
}
console.log("I know that your name is " + “hisname”);
console.log(“It has a length of " + hisname.length + " (the name)”);
console.log("I also know that your grandfather’s name was propably " + hisname);
if (all > 25)
{
console.log(“you are also bullshiting me”);
}
else if (all < 10)
{
console.log(“you are also bullshiting me”);
}
else
{
console.log(“TA-DAAAAA”);
}
confirm(“Hello I am here to know many things about you”);
var hisname = prompt(“Just tell me your name”);
var hisage = prompt(“And your age”);
var hisheight = prompt (“And your height”);
var hisweight = prompt (“And your weight”);
var itsgender = prompt (“And your gender”);
var all = hisname.length + hisage.length + hisheight.length + hisweight.length + itsgender.length;
if (itsgender.length > 0)
{
confirm(“Are you ready to be amazed?”)
}
console.log("I know that your name is " + hisname);
console.log(“It has a length of " + hisname.length + " (the name)”);
console.log("I also know that your grandfather’s name was propably " + hisname);
if (all > 25)
{
console.log(“you are also bullshiting me”);
}
else if (all < 10)
{
console.log(“you are also bullshiting me”);
}
else
{
console.log(“TA-DAAAAA”);
}
removed quotes from hisname in line 12 and i got the console to display