← 수업 제작 도구
홈 › Components › Card Sort (카드 정렬) › 화면 1

화면 1. Card Sort.totalCards [source]

원본: Computation Layer 문서(Card Sort (카드 정렬)) · Try It (원본 화면)

화면 번호1 / 3
문서 항목 설명 (원문)totalCards Number of cards in the Card Sort.

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

화면 1 캡처

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

2. CL이 입력된 곳

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

번호이름종류CL 코드 원문, 번역, 설명
1master CL
(화면 전체)
SCREEN
# This code imports the total number of cards in
# a card sort called “sort” and assigns it to a
# variable called “total”.
▷ "sort"라는 카드 정렬(card sort)의 전체 카드 수를 가져와 "total"이라는 변수에 정한다.

total = sort.totalCards
▶ 변수 total은 카드 정렬 구성요소 sort에 있는 카드의 수(sort.totalCards)로 한다.

# This code injects that variable into the subtitle.
▷ 그 변수를 부제목에 끼워 넣는다.

subtitle: "Total Cards: ${total}"
▶ 화면 제목 아래에 표시할 부제목(subtitle)은 "Total Cards: ${total}"(전체 카드 수: total의 값)로 한다.
${ }는 글자 안에 변수의 값을 끼워 넣는 표기이다.