used conditional inside of array

used conditional inside of array