# Just for fun

**URL:** <https://forum.kirupa.com/t/just-for-fun/251224>\
**Category:** Uncategorized\
**Created:** [February 6, 2008, 1:12pm UTC](https://forum.kirupa.com/t/just-for-fun/251224 "2008-02-06T13:12:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![borrob](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@borrob](https://forum.kirupa.com/u/borrob)\
**Post date:** [February 6, 2008, 1:12pm UTC](https://forum.kirupa.com/t/just-for-fun/251224/1 "2008-02-06T13:12:35Z")

</div>

For all you javascript users. I was stunned that i didn’t think of this earlier but you see to much programming causes blindness. But when i saw it it was so funny a had to share it:

You know how you write document.getElementById(‘some\_object’).value, for the 10000 time.  
This is my new insight:

function dog(id)  
{  
return document.getElementById( id );  
}

so now i can write:  
dog(‘some\_object’).value

it makes my code so much shorter and it’s better readable too…
