title: How to remove the Null symbol in a Table in Mathematica?
body: <p>I need to use <code>If</code> inside of a <code>Table</code> loop, e.g. <code>Table[If[i&lt; 3, i], {i, 5}]</code> will give <code>{1, 2, Null, Null, Null}</code></p>
  
  <p>But I want the result to be <code>{1,2}</code>.</p>
  
  <p>Any fix for this?</p>
  
  <p>EDIT:<br>
  What if we consider <code>Table[If[i&lt; 3, f[i]], {i, 5}]</code> which gives <code>{f[1], f[2], Null, Null, Null}</code></p>