# 戻り値に複数の値

# PHP

list($code, $message) = func01();
function func01() {
    return [404, 'Not Found'];
}
list($code, $message) = func01();

# Python

[code, message] = func01()
def func01():
  return [404, 'Not Found']
[code, message] = func01()

# TypeScript

const [code, message] = func01();
function func01(): [number, string] {
  return [404, 'Not Found'];
}
const [code, message] = func01();

[ 📩 ご意見 ]