Tell us what’s happening:
I have a working implementation of “ES6: Create Strings using Template Literals” but because of a Blocked Cross-Origin Request, some of the resources can’t be loaded. How do I report this?
This is what I have in my console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://qmjyl5wyti-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algolia%20for%20vanilla%20JavaScript%20(lite)%203.27.1%3Breact-instantsearch%205.0.3%3BJS%20Helper%202.26.0&x-algolia-application-id=QMJYL5WYTI&x-algolia-api-key=4318af87aa3ce128708f1153556c6108. (Reason: CORS request did not succeed).
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: moz-extension://0c73190e-9a08-234a-a108-092b5ba90901/js/lib/purify.min.js
Source Map URL: purify.min.js.map[Learn More]
Source map error: request failed with status 404
Resource URL: https://learn.freecodecamp.org/vs/loader.js
Source Map URL: ../../min-maps/vs/loader.js.map[Learn More]
Source map error: request failed with status 404
Resource URL: https://learn.freecodecamp.org/vs/editor/editor.main.js
Source Map URL: ../../../min-maps/vs/editor/editor.main.js.map[Learn More]
Source map error: request failed with status 404
Resource URL: https://learn.freecodecamp.org/vs/editor/editor.main.nls.js
Source Map URL: ../../../min-maps/vs/editor/editor.main.nls.js.map[Learn More]
Source map error: request failed with status 404
Resource URL: https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals/
Source Map URL: normalize.min.css.map[Learn More]
Your code so far
const result = {
success: ["max-length", "no-amd", "prefer-arrow-functions"],
failure: ["no-var", "var-on-top", "linebreak"],
skipped: ["id-blacklist", "no-dup-keys"]
};
function makeList(arr) {
"use strict";
// change code below this line
const [a, b, c] = arr;
const resultDisplayArray = [
`<li class="text-warning">${a}</li>`,
`<li class="text-warning">${b}</li>`,
`<li class="text-warning">${c}</li>`,
];
// change code above this line
return resultDisplayArray;
}
/**
* makeList(result.failure) should return:
* [ <li class="text-warning">no-var</li>,
* <li class="text-warning">var-on-top</li>,
* <li class="text-warning">linebreak</li> ]
**/
const resultDisplayArray = makeList(result.failure);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0
.
Link to the challenge: