A few small refactors to help with the ES6 best practices in #2:
Some variables declared with let were never reassigned so they were changed to const. Note: modifying contents of arrays and objects doesn't require a let.
One console.log string changed to string template
A couple of intermediary data variables converted to just returning a built object
A few small refactors to help with the ES6 best practices in #2:
let
were never reassigned so they were changed toconst
. Note: modifying contents of arrays and objects doesn't require alet
.data
variables converted to just returning a built objectHope these are useful!