How to Test whether the property value of each property in the object is not empty

Test whether the property value of each property in the object is not empty

var opt= true
var form={id:1,name:'xx',sex:''}
      for(let key in form){
        if(!Boolean(form[key])){
         opt= false //First define an opt with its true, false to determine if there is empty data in the object
          return
        }else{
          opt= true
        }
      }

Read More: