I am defining a class in javascript using this...
// file_a.js
function class_a() {
this.prop1 = null;
this.prop2 = null;
}
// file_b.js
var obj = new class_a;
// I need to check here if class_a exists
How can I do this?
Regards
if (typeof class_a === 'function')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.