Array Within An Array Javascript Append Function In Prolog