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

화면 4. Ordered List.textAtIndex [source]

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

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

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

화면 4 캡처

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

2. CL이 입력된 곳

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

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 메모메모
# Insert into the content of this note the names of the fruits
# that are listed first (textAtIndex(1)) and last (textAtIndex(5)).
▷ 이 메모의 내용에, 맨 앞(textAtIndex(1))과 맨 뒤(textAtIndex(5))에 놓인 과일의 이름을 끼워 넣는다.

content:
"Order the following fruits from least tasty to most tasty.

You said that the ${order1.textAtIndex(5)} was the most tasty and the ${order1.textAtIndex(1)} was the least tasty. 

Discuss your opinion with a partner."
▶ 메모의 내용(content)은 "Order the following fruits from least tasty to most tasty."(다음 과일을 가장 맛없는 것부터 가장 맛있는 것까지 순서대로 놓으시오.) 아래에 "You said that the ${order1.textAtIndex(5)} was the most tasty and the ${order1.textAtIndex(1)} was the least tasty."(맨 뒤에 둔 과일이 가장 맛있고 맨 앞에 둔 과일이 가장 맛없다고 했다.), 그 아래에 "Discuss your opinion with a partner."(짝과 의견을 이야기하시오.)를 이은 여러 줄 글자로 한다.
textAtIndex(번호)는 그 번호의 자리에 놓인 항목의 글자를 알려 주며 번호는 1부터 센다. ${ }는 글자 안에 변수의 값을 끼워 넣는 표기이다. content는 메모에 직접 적은 글을 덮어쓴다.