const user = order => (order.shippingMethod === 'aliexpress' ||order.shippingMethod ==='wbfbs') ? 'sales' : 'lg'; alert([{shippingMethod : 'aliexpress'}, {shippingMethod : 'test'}, {shippingMethod : 'wbfbs'}].map(user));