在 JavaScript 中,要获取集合的第一个值,可以使用以下方法之一: 使用数组的 [0] 下标: const arr = [1, 2, 3]; const first = arr[0]; // first 的值为 1