Computation of address from Object I am computing address string form the JS object. I am using EmberJS. I wanted to review my code and tell me how we can improve the computation of address, or is there any better way to it? 

const {
  get,
  computed,
} = Ember;

// other properties.
completeAdress: computed({
    let address = '';
    if (get(this, 'title')) {
        address = `${address},${get(this, 'title').toString()}`;
    }
    if (get(this, 'number')) {
        address = `${address},${get(this, 'number').toString()}`;
    }
    if (get(this, 'street')) {
        address = `${address},${get(this, 'street').toString()}`;
    }
    if (get(this, 'city')) {
        address = `${address},${get(this, 'city').toString()}`;
    }
    if (get(this, 'region')) {
        address = `${address},${get(this, 'region').toString()}`;
    }
    if (get(this, 'state')) {
        address = `${address},${get(this, 'state').toString()}`;
    }
    if (get(this, 'country')) {
        address = `${address},${get(this, 'country').toString()}`;
    }
    if (get(this, 'zipcode')) {
        address = `${address},${get(this, 'zipcode').toString()}`;
    }
    if (get(this, 'phone')) {
        address = `${address},${get(this, 'phone').toString()}`;
    }
    if (address.length &gt; 0) {
        address = address.substring(1, address.length);
    }
    return address;
}),
// other properties 


Basically is there any way to avoid too many if conditions.

{
  title: 'MacD',
  street: '49'
  // rest of the properties are related to address only
};
// This is example address object
2 suggestions..


Condense all that duplicated code.
Don't concat your strings like that. Every time you do that that string has to be re-loaded into memory all over again. It's more efficient to put your string pieces into an array and then join them later. 



completeAdress: computed({
    let address = [];
    const address_components = ['title', 'number', 'street', 'city', 'region', 'state', 'country', 'zipcode', 'phone'];
    for(var i=0; i&lt;address_components.length; i++)
        if (get(this, address_components[i]))
            address.push(get(this, address_components[i]).toString());
    address = address.join(',');
    if (address.length) 
        address = address.substring(1, address.length);
    return address;
}),



(For some reason the markdown parser didn't want to format this as code unless i also formatted it as a quote.)