# Why does no exists method in p5.js?

**URL:** <https://discourse.processing.org/t/why-does-no-exists-method-in-p5-js/1013>\
**Category:** p5.js\
**Created:** [June 16, 2018, 4:09pm UTC](https://discourse.processing.org/t/why-does-no-exists-method-in-p5-js/1013 "2018-06-16T16:09:06Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [June 16, 2018, 9:36pm UTC](https://discourse.processing.org/t/why-does-no-exists-method-in-p5-js/1013/6 "2018-06-16T21:36:09Z")

</div>

> [@Kevin](#):
>
> How does it help solve OP’s problem?

Let’s w8 for @erkosone for it, then I’ll clarify it more. 😼

After all, it follows the same approach I’ve already done for him here: 🙄

> [@How i extends class in p5.js?](https://discourse.processing.org/t/how-i-extends-class-in-p5-js/894/3):
>
> JavaScript got a prototype inheritance system, in which we make available all properties to be extended by annexing them all to a constructor function’s property object {} called prototype: card_file_box For example If we wanna extend the class p5 (classes are constructor functions btW) w/ a new method called square(), we can simply annex it to p5.prototype{} object, like this: +1 p5.prototype.square = function (x, y, size) { return this.rect(x, y, size, size); }; And a more complex…

---

_[View the full topic](https://discourse.processing.org/t/why-does-no-exists-method-in-p5-js/1013)._
