I know the definition of the direct product $G\times H$ of two random groups $G$ and $H$. It is also clear to me that this can be extended to a product of a finite number of groups $G_1\times \dots G_n$.
My question is whether it makes sense to do this for an infinite number of groups. For example, if $G_i$ are groups for $i\in \mathbb{Z}$ (or I guess $\mathbb{N}$) can one simply define $$ \times_{i\in \mathbb{Z}} G_i = \{ (g_i): g_i\in G_i\} $$
so that this is a group under componetwise operation?
I checked the definition of a group and I am pretty sure this would also be a groups, but I would still like to have confirmation.
My next questions is: Can this all be done if the index set is uncountable? In that case I am not sure how the operation would work since there isn't a first "coordinate".