Skip to content

Instantly share code, notes, and snippets.

@FrancoB411
Created August 1, 2012 18:16
Show Gist options
  • Select an option

  • Save FrancoB411/3229447 to your computer and use it in GitHub Desktop.

Select an option

Save FrancoB411/3229447 to your computer and use it in GitHub Desktop.
Simple test app, goofing around with google blockly.
var no;
var name2;
var yes;
var gender;
var so;
var comma;
var iscool;
var invitationQuestion;
function convo() {
name2 = window.prompt('please enter your name');
printCool();
isFemale_();
findOutIfFemale();
}
function findOutIfFemale() {
if (gender != (yes || no)) {
window.alert('I\'m a guy, so I only understand yes or no answers.');
isFemale_();
}
if (gender == yes) {
printInvite();
}
if (gender == no) {
sup();
}
}
function isFemale_() {
gender = (window.prompt('Are you female? Yes or No?')).toLowerCase();
}
function printCool() {
window.alert('Cool.');
}
function printIsCool() {
window.alert(name2 + iscool);
}
function sup() {
window.alert('Oh, hey. What\'s up bro?');
}
function printInvite() {
window.alert((so + name2) + (comma + invitationQuestion));
}
no = 'no';
yes = 'yes';
so = 'So ';
comma = ', ';
invitationQuestion = 'What are you doing later?';
iscool = ' is cool.';
convo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment