generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Club Houses » Off Topic
Home Search
 

Re: Run this in your browser console

Previous Thread :: Next Thread 
gmvdnlqlesazkwoneghh is not online. gmvdnlqlesazkwoneghh
Joined: 10 Sep 2015
Total Posts: 73
11 Sep 2015 11:52 AM
var name = prompt("Hello, what is your name?")
alert("Hello, " + name + ".");
alert("You have a knife during the school lesson,")
var answer = prompt("what do you do? (type the answer letter) A: Hide it - B: Tell the teachers C: Call your parents and go home");
if (answer === "A")
{ alert("Wow, nice answer but you could have done better.")
};
if (answer === "B")
{ alert("No, what a mistake! They could suspend you from school.")
};
if (answer === "C")
{ alert("Ok, but now get ready to answer their questions.")
};
Report Abuse
TraciLaci is not online. TraciLaci
Joined: 08 Sep 2015
Total Posts: 87
11 Sep 2015 11:53 AM
You shouldn't put three "ifs" in a row. Use else-ifs or a switch statement.
Report Abuse
gmvdnlqlesazkwoneghh is not online. gmvdnlqlesazkwoneghh
Joined: 10 Sep 2015
Total Posts: 73
11 Sep 2015 11:55 AM
but it works anyways
Report Abuse
Randcomo26 is not online. Randcomo26
Joined: 23 Jun 2015
Total Posts: 6954
11 Sep 2015 11:55 AM
Better off using == instead of ===

Unless you want it to match exactly the same use ===
Report Abuse
gmvdnlqlesazkwoneghh is not online. gmvdnlqlesazkwoneghh
Joined: 10 Sep 2015
Total Posts: 73
11 Sep 2015 11:56 AM
oops i didn't put a "-" after "teachers" in the second prompt
Report Abuse
MrSlendyDude is not online. MrSlendyDude
Joined: 19 Nov 2014
Total Posts: 367
11 Sep 2015 11:57 AM
3many viruses
or what
im too scared to run it
Report Abuse
TraciLaci is not online. TraciLaci
Joined: 08 Sep 2015
Total Posts: 87
11 Sep 2015 11:57 AM
@gmv

But it's less efficient.

Also use String.toUpperCase() so the user can type in the letters in any case.
Report Abuse
gmvdnlqlesazkwoneghh is not online. gmvdnlqlesazkwoneghh
Joined: 10 Sep 2015
Total Posts: 73
11 Sep 2015 11:57 AM
i like === more than ==
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Off Topic
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image