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

Q1599 Is it posible to use something like pointers to different objects depending on a condition?

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

Yes:

<script language="JavaScript"><!--
var okay = confirm('Is everything okay?');

var pointer;

if (okay) {
  pointer = new Object();
}
else {
  pointer= new Date();
}
//--></script>

©2018 Martin Webb