How transform a value into a html element in p5?

If you get that error it means you’re probably using a var which still doesn’t have a value assigned to it.

Besides, createElement() is a method from class p5, which represents the sketch itself.

So you just invoke it directly just like you did w/ createDiv(), createInput() & createButton().

1 Like