我正在寻找一个等同于Objective-C的[@"blah" isKindOfClass:[NSString class]]
的Ruby的"blah".is_a?(String)
发布于 2013-11-15 22:49:15
我觉得创建一个类的实例是错误的。你永远不会知道,构造函数可能会期望什么参数。
所以我想出的是:
class A
class B extends A
console.log B.__super__ is A.prototype# => true
https://stackoverflow.com/questions/5933569
复制相似问题