配列

配列表現

Jasmine Tea

[["国語",78],["算数",64],["英語",92]]

JavaScript

[["国語",78],["算数",64],["英語",92]]

Python

[["国語",78],["算数",64],["英語",92]]

配列変数への代入

Jasmine Tea

let a@ = [["国語",78],["算数",64],["英語",92]]

JavaScript

let a = [["国語",78],["算数",64],["英語",92]]

Python

a = [["国語",78],["算数",64],["英語",92]]

配列の各要素へのアクセス

Jasmine Tea

let a@ = [["国語",78],["算数",64],["英語",92]]
let b@ = a@[1]  // ["算数",64]

JavaScript

let a = [["国語",78],["算数",64],["英語",92]]
let b = a[1]  // ["算数",64]

Python

a = [["国語",78],["算数",64],["英語",92]]
b = a[1]  // ["算数",64]

配列の長さの取得

Jasmine Tea

let a@ = [["国語",78],["算数",64],["英語",92]]
let l = len(a@)  // 3

JavaScript

let a = [["国語",78],["算数",64],["英語",92]]
let l = a.length;  // 3

Python

a = [["国語",78],["算数",64],["英語",92]]
l = len(a);  // 3