For the odd moments I can manage to think of something.

Training wheels for javascript

For better or worse I have been learning javascript. Mostly cutting and pasting other bits of code or debugging stuff to learn how stuff works.

Today – I made my very own script!
I know that pride comes before a fall and there may be some n00b mistakes – but when last checked – it worked. So i’m doing a little shaky-ass victory dance and will learn more tomorrow.

Behold, the script that turns your browser into a 5 year old….

Why?

var why;

why = window.prompt(‘Why?’,”);

while (why != ‘Because I said so’)
{
document.write(‘Yeah, but…’+’
‘);
why = window.prompt(‘Why?’,”);

}
document.write(‘Oh, okay.’);

yay!
JK

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Basic HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS

%d bloggers like this: