Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Animal = function() {
- if (this.constructor === Animal) {
- throw new Error("Can't instantiate abstract class!");
- }
- // Animal initialization...
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement