I am new to JS React, just learn it by following online course, there has the variable inside the URL string, but it unable to return the variable while I running it. May I know how to set the variable inside the URL string correctly?
request.js:
const API_KEY = "xxxxxxxxxxxxxx";
const requests = {
fetchTrending: '/trending/all/week?api_key=$(API_KEY)&language=en-US',
};
export default requests;