Printing allows you to inspect variables on runtime. It works similarly to console.log, only when using print, the output is shown directly within your prototype. Note that you need to use print() in Javascript (but not in CoffeeScript). We will omit these in the rest of the docs.
译:打印允许您在运行时检查变量。它的工作方式类似于console.log,仅当使用打印,输出是直接显示在你的原型。注意,你需要在JavaScript中使用print()(但不是在CoffeeScript)。我们会忽略这些在文档的其余部分。
print "Hello"
# Output: "Hello"
You can inspect any type of value, and even multiple at the same time.
译:您可以检查任何类型的值,甚至同时检查多个类型的值。
layerA = new Layer
x: 10
y: 20
# A single property value
print layerA.x
# Output: 10
# Multiple values
print layerA.x, print layerA.y
# Output: 10, 20