← 수업 제작 도구
홈 › Components › Ordered List (정렬 리스트) › 화면 3

화면 3. Ordered List.itemAtIndex [source]

원본: Computation Layer 문서(Ordered List (정렬 리스트)) · Try It (원본 화면)

화면 번호3 / 11
문서 항목 설명 (원문)itemAtIndexitemIndex: number Returns the starting item index of the item that's at the given index (indexed starting with 1).

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 3 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 정렬 리스트정렬 리스트
# This places a check in the summary tab
# of the dashboard as long as the first item is
# in the first position. The location of the
# remaining items do not matter.
▷ 첫 번째 항목이 첫 번째 자리에 있기만 하면 교사 대시보드의 요약 탭에 체크 표시를 한다. 나머지 항목의 위치는 상관없다.
correct: this.itemAtIndex(4) = 4
▶ 정렬 리스트의 정답 조건(correct)은 this.itemAtIndex(4) = 4, 즉 4번째 자리에 처음 4번째였던 항목이 놓여 있으면 참으로 한다.
this.itemAtIndex(번호)는 그 번호의 자리에 놓인 항목이 처음에 몇 번째였는지를 알려 주며 번호는 1부터 센다. 이 줄의 =는 줄 맨 앞의 정의가 아니라 correct:의 값 자리에서 두 값이 같은지 비교하는 것이다.