If Not Empty Array Javascript Append Function In Prologic