'What should i do when after executing a set of codes thein the p5 web editor says that "createSprite" fuction is not defined?

background = createSprite(20,100);

background.addImage(backgroundImg); background.scale = 0.5;

//After execution the output screen shows "createSprite" not defined//



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source