Jump to content
EN
Play

Forum

Coding


 Share

Recommended Posts

hi, i like to code in javascript and i was wondering if others like to do it too. here is just a little something i made. go into your browser and press and hold ctrl, shift, and C to open your developer mode. (only tested in chrome). (make sure your in the console tab.) just copy the below code in! :)

 

var user = prompt("You're minding you're own business when along comes a German boy wearing lederhosen and selling strudel. will you BUY SOME STRUDEL, WALK AWAY YODELING, or ASK WHERE CAN I BUY LEDERHOSEN").toUpperCase();
 
switch(user) {
  case 'BUY SOME STRUDEL':
    var buy = prompt("How courageous! are you naive? (YES or NO)?").toUpperCase();
    var hungry = prompt("Are you hungry? this is a great snack!").toUpperCase();
    if(buy === 'YES' || hungry === 'YES') {
      console.log("Good thing you love strudel, you gobble it down happily!");
    } else {
      console.log("you're not hungry and you didn't buy any. #DareToEatStreudel");
    }
    break;
  case 'WALK AWAY YODELING':
    var good = prompt("are you a good yodeler? (YES or NO)?").toUpperCase();
    var wearing = prompt("are you wearing your yodeling lederhosen?").toUpperCase();
    if(good === 'YES' && wearing === 'YES') {
      console.log("Great! you now have a yodeling partner!");
    } else {
      console.log("You broke everyone's ears. next time you yodel make sure to do it away from others.");
    }
    break;
  case 'ASK WHERE CAN I BUY LEDERHOSEN':
    var money = prompt("do yu have the money to buy them? (YES or NO)?").toUpperCase();
    var shy = prompt("are you too shy to ask?").toUpperCase();
    if(money === 'YES' || shy === 'NO') {
      console.log("You now have your very own lederhosen!");
    } else {
      console.log("You were shy and/or didn't have any money, you lost your chance to get authentic lederhosen.");
    }
    break;
  default:
    console.log("I didn't understand your choice. Hit run and try again, pick BUY SOME STRUDEL, WALK AWAY YODELING, or WHERE CAN I BUY LEDERHOSEN  ");
}
Edited by OtisStorm

Share this post


Link to post
Share on other sites

I don't code in javascript but I code in other languages.

 

List of languages I programmed/scripted in:

C# (Forgot alot about it)

Visual Basic

Action Script 2

Assembly (A bit)

HTML

Edited by GeneralPie

Share this post


Link to post
Share on other sites

java not javascript 

Java: Object-based programming language that allows you to build standalone applications.

Javascript: Scripting language used in web browsers.

Share this post


Link to post
Share on other sites

Java: Object-based programming language that allows you to build standalone applications.

Javascript: Scripting language used in web browsers.

what i meant is that i use java not javascript

i wasn't clear...

Share this post


Link to post
Share on other sites

I hate javascript... :ph34r:

Me too, only because of all the cross browser compatibility issues...but I really have to learn more JS because I really want to mess around with AngularJS. Seems like a pretty sweet framework.

 

The browser wars really set us back a decade or more :/

  • Like 1

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...