Hide Profile Field if User Meta is blank – WordPress

Solution:

If by user meta you mean user input, one approach would be to find all input elements, check if their value is empty and then hide their parent tr element.

 

// Find all <input> elements:
document.querySelectorAll("input").forEach( input =>{
  // Check to see if the value is empty:
  if ( input.value.trim() === "" ){
    // Find the closest <tr> parent of the input and 
    // hide it:
    input.closest("tr").style.display = "none";
  }
});
<table>
  <tr>
    <td>
      <label for="a">Label A</label>
    </td>
    <td>
      <input id="a" />
    </td>
   </tr>
  <tr>
    <td>
      <label for="b">Label B</label>
    </td>
    <td>
      <input id="b" />
    </td>
   </tr>
  <tr>
    <td>
      <label for="c">Label C</label>
    </td>
    <td>
      <input id="c" value="Value" />
    </td>
   </tr>
</table>