You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
300 B
JavaScript

"use strict";
const objid = require("./");
let a = {};
let b = {};
let c = new Date();
let d = function() {};
console.log(objid(a)); // 0
console.log(objid(b)); // 1
console.log(objid(c)); // 2
console.log(objid(d)); // 3
console.log(objid(b)); // 1 (an ID was assigned to that object previously)