I am new to array de-duplication, this has a sintaxis error, but I don't know how to fix it.
const txt = 'this is a tes';
[['h1', 'render an h1 tag'], ['p', 'render a p tag'], [Text, 'render Custom component']].forEach(
(case: [Component, assertion]) => {
console.log(Component,assertion);
});
Can you please help me?
You have typo, just remove "case:"
const txt = 'this is a tes';
[['h1', 'render an h1 tag'], ['p', 'render a p tag'], [Text, 'render Custom component']].forEach(
([Component, assertion]) => {
console.log(Component,assertion);
});