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

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

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

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

Yes:

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

var pointer;

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

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.