Q: Adding a start and end marker to a GeoJSON linestring I have a GeoJSON route that was created using ORSM which is as follows: 
var noelev = {"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-84.477478,37.988621],[-84.477786,37.987948],etc,[-86.448045,36.984769]]}}

I add the data to the script using:
var noel = noelev;


I add this data to the map and it shows the line string
 L.geoJSON(noel, {


       }).addTo(map);

And I am trying to add a marker point to the start and end of this line
I have tried using: 
   var coords = noel.features[0].geometry.coordinates[0];
   var marker = L.marker(new L.LatLng(coords[0], coords[1]), {

   }).addTo(map);

I get a TypeError: noel.feature is undefined
But this does not work. I have tried everything!

A: Here I just used your linestring with the etc removed, and only plotting first and last
var noelev={
    "type": "Feature",
    "properties": {},
    "geometry": {
        "type": "LineString",
        "coordinates": [
            [-84.477478, 37.988621],
            [-84.477786, 37.987948],
            [-86.448045, 36.984769]
        ]
    }
}

var noel = noelev;

    var osm=new L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',{ 
    attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map);

    L.geoJSON(noel, {color:"red" }).addTo(map);

//Number of points in linestring
numPts = noel.geometry.coordinates.length;

    var beg = noel.geometry.coordinates[0];
    var end = noel.geometry.coordinates[numPts-1];


    L.marker([beg[1],beg[0]]).addTo(map);
    L.marker([end[1],end[0]]).addTo(map);


A: GeoJSON is Long/Lat (X,Y) Leaflet points are Lat,Lng. Also you also may want to accommodate linestrings with more then two vertices. So get a count and use it in a for loop.
This map help. 
--Copy/Paste below ---
<!DOCTYPE html>
<html>
 <head> 

    <title>Example</title>
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" />
    <script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

    <!-- Load Esri Leaflet from CDN -->
    <script src="https://unpkg.com/esri-leaflet@2.2.4/dist/esri-leaflet.js"
    integrity="sha512-tyPum7h2h36X52O2gz+Pe8z/3l+Y9S1yEUscbVs5r5aEY5dFmP1WWRY/WLLElnFHa+k1JBQZSCDGwEAnm2IxAQ=="
    crossorigin=""></script>

<style>
html, body, #map {
width : 100%;
height : 100%;
}

</style>
</head>
<body>
<div id="map"></div>
<script>

var map = L.map('map').setView([37.599000150648514,  -85.56152343750001], 8);

var noelev={
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            -84.477478,37.988621
          ],
          [
            -84.477786,37.987948
          ],
          [
            -86.448045,36.984769
          ]
        ]
      }
    }
  ]
}

var noel = noelev;
console.log(noel);

    var osm=new L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',{ 
    attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}).addTo(map);

 L.geoJSON(noel, {color:"red" }).addTo(map);

console.log(noel.features[0].geometry.coordinates.length); //Number of points in linestring
numPts = noel.features[0].geometry.coordinates.length;

var i;
for (i = 0; i < numPts; i++) {

    var coords = noel.features[0].geometry.coordinates[i];

    console.log(coords);  //In lng/lat not lat/lng, need to flip

    var lat = coords[1];  
    var lon =  coords[0];
    L.marker([lat,lon]).addTo(map);
}

</script>
</body>
</html>

