[Tip] How to pass an array as an argument to a function.

| No Comments »

Problem: Help! Iis it possible to pass the values of an array as an argument in my function?

Anwer: Conveniently, Yes! You can indeed use set an array as the argument of a function.

var mapArgs = [0,20,50,10];
draw.apply(this, mapArgs);

function draw(x1,x2,y1,y2)
{ // do something…
alert(x1 + ‘ ‘ + x2 + ‘ ‘ + +y1 + ‘ ‘+ y2);

Of course you can use it in a more creative way

var run = { ready : [“Is this awesome?”], getset : [“or…”], go: [“What?!”] }
var func = {
ready: function(str)
getset: function(str)
go: function(str)
alert(str + ‘!!!’);

for (x in run)
func[x].apply(this, run[x]);

How to: Create logos in 1 easy step (placeholder purposes)

| No Comments »

Looking to build a logo but don’t have the time? Need a temporary logo for your website, software or documents? Here’s a good website that you might find very useful. Logo54.com allows you to create similar logos of the following:

Here are some examples:




Pretty nifty huh? Oh, and please remember that the patterns used for building these logos are patented (copyright?) so only use it for placeholders or “just-for-fun” activities.