This function accepts an array of labels that are used to create individual radio-style <input> elements. The function also accepts a string that is used as the name for that input group.
Currently, this function is being called twice with the variables companies and roles as the first arguments. However, each of these variables are assigned empty arrays.
Instead, you will use the getRoles() and getCompanies() functions from salaryData.js to initialize these variables.
First, at the top of main.js, use ES6 named import syntax to import getRoles and getCompanies from salaryData.js. Check the file system to determine the relative path from main.js.
This function accepts an array of labels that are used to create individual radio-style
<input>
elements. The function also accepts a string that is used as the name for that input group. Currently, this function is being called twice with the variables companies and roles as the first arguments. However, each of these variables are assigned empty arrays. Instead, you will use the getRoles() and getCompanies() functions from salaryData.js to initialize these variables. First, at the top of main.js, use ES6 named import syntax to import getRoles and getCompanies from salaryData.js. Check the file system to determine the relative path from main.js.