C Sharp Loop Through Array Javascript Methods And Functions