Почему не проходит проверка ?
helper.js :
export const errorPractice = (name, surname) => {
try {
if (!name || !surname) {
throw new Error('something is missing');
}
console.log(`Hey, ${name} ${surname}! Welcome to the JavaScript error practice.`)
} catch (myError) {
console.log(myError.message);
}
}
solution.js :
import { errorPractice } from './helper.js';
errorPractice('James', 'Bond'); // no error
errorPractice(); // error