Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1656 Can I make an array of functions?

You are here: irt.org | FAQ | JavaScript | Object | Q1656 [ previous next ]

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>

Feedback on 'Q1656 Can I make an array of functions?'

©2018 Martin Webb