Articles → JavaScript → Instanceof Operator In Javascript
Instanceof Operator In Javascript
Instance Creation In Javascript
var date = new Date();
var obj = new Object();
Purpose Of Instanceof
Syntax
instanceName Instanceof ObjectType
Example
<script type="text/javascript">
var date = new Date();
var obj = new Object();
alert(date instanceof Date);
alert(obj instanceof Date);
</script>
Try It