Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1656 Can I make an array of functions?

irt.org | Knowledge Base | JavaScript | Object | Q1656 [ previous next ]

Q1656 Can I make an array of functions?

Try:

<html>

<head>
<script language="JavaScript"><!--
function a() { 
  alert('a');
}

function b(c) {
  alert('b:' + c);
}

fa = new Array (a,b);

fa[0]();

fa[1]('hello');
//--></script>
</head>

<body>
...
</body>

</html>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.