Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Mayo() {
- //yummy
- }
- function isYummy(food) {
- if(food instanceof Mayo)
- return true;
- return false;
- }
- alert("Mayo is " + isYummy(new Mayo())?"yummy":"not yummy");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement