I'm starting development of feature layers w/ Javascript and need to implement a feature layer. It seems simple what I am trying to do but perhaps its because I'm a newbie at this. I have been following the documentation and examples in developers.arcgis.com/javascript, such as:
https://developers.arcgis.com/javascript/latest/add-a-feature-layer
These examples show the JS code embedded in HTML, which I can run in CodePen for the results. However, what I want to do is implement such as a feature layer, so I can in turn get a URL for the REST API, which in turn I can use in ArcGIS Online to add the layer. I've been going thru the docs and examples and I see nothing which explains how to do this.
What am I missing? I have the HTML, CSS and JS code in a textfile which I want to implement as a feature layer, now I am trying to figure out how. Much thanks!