blockly > VariableMap > getVariableById

Method VariableMap.getVariableById()

ค้นหาตัวแปรตามรหัสที่กำหนดและแสดงผลตัวแปร แสดงผล Null หากไม่พบ

ลายเซ็น:

getVariableById(id: string): VariableModel | null;

พารามิเตอร์

พารามิเตอร์ Type คำอธิบาย
id สตริง รหัสที่ต้องการตรวจสอบ

ส่งกลับ:

VariableModel | null

ตัวแปรที่มีรหัสที่กำหนด