I’m trying to create an area plot linked to a slider that reveals more of the area under the curve as the slider is moved from 0 to 1. When I use this code snippet:
const slider = document.getElementById(‘slider’);
I get a SyntaxError: Unexpected token with the problem being const (squiggly red line underneath).
How do I fix this? Are there libraries I need to import first? (I’m more familiar with Python, so please forgive me for possibly using the wrong phrases)