Flatten Array Using Javascript Variables In Innerhtml Vs Innertext