I know that but isn’t it ES6 syntax? does P5JS support ES6 syntax? BTW I check he was getting error at
var  tailPath;
it should be
var tailPath = ;
1st thing you’re gonna need is switch the engine from “Processingjs” to “P5js”.
Also read this wiki about transition from Processing’s Java Mode to p5js:
And the link below got many sketches w/ both Java Mode & p5js versions:
Have you seen the compatibility table for the
Chrome since version 49 (42 under ´strict mode´).
Firefox since version 45. And so on.
Chrome v42 & v49 were released in 2015/Apr/14 & 2016/Mar/02 respectively:
Google Chrome is a freeware web browser developed by Google LLC. The development process is split into different "release channels", each working on a build in a separate stage of development. Chrome provides 4 channels: Stable, Beta, Dev, and Canary. On the stable builds, Chrome is updated every two to three weeks for minor releases and every six weeks for major releases.
The following table summarizes the release history for the Google Chrome web browser.
Android version (update from 18):
While Firefox v45 was released in 2016/Mar/08:
So it has been about 4 years we have the
class keyword available in major browsers!
p5js is a JS library. We can write ES6 code and use ES5 libraries w/ no worries.