Tell us what’s happening:
Hi, can someone explain why this code is working only if is on one line? Im doing solutions in external editor and code is placed on multiple lines as in example. but when I place code to FCC editor code doesn’t pass. So I am confused. Test PASS only when code is on one line.
Your code so far
"use strict";
export default function subtract(x,y) {return x - y;} // PASS
"use strict";
export default function subtract(x,y) {
return x - y;
} // DO NOT PASS
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default