Question from the Javascript - Fundamentals test

Archived

What is the interest of the IF block?

function getSize(tab) { 
    return tab.length; 
} 
const list = ['rice', 'quinoa', 'semolina', 'milk']; 
if (getSize(list)!= 4) { 
    console.error('error');
 } 
Author: Vincent CotroStatus: Archived(New question!)(Update)Question passed 78 times
-1
Community EvaluationsNo one has reviewed this question yet, be the first!