
hoisting
词源
源自中古英语 'hoisten',可能来自古北欧语 'heista',意为 '升起' 或 '提升'。
noun
❶ 指在编程中,变量和函数的声明会被提升到当前作用域的顶部,使得它们可以在声明之前被引用。
“Hoisting allows you to use a function before it is declared in the code.”
(提升机制允许你在代码中声明函数之前就使用它。)
“Due to hoisting, the variable is accessible even before its declaration.”
(由于提升机制,变量在声明之前就可以被访问。)
❶ 指在物理或工程领域中,通过机械装置将重物提升到高处的过程。
“The hoisting of the heavy equipment required a crane.”
(提升重型设备需要使用起重机。)
“Safety measures are essential during the hoisting of construction materials.”
(在提升建筑材料时,安全措施至关重要。)
verb
❶ 在编程中,指变量和函数的声明被自动提升到作用域顶部的行为。
“In JavaScript, function declarations are hoisted to the top of their scope.”
(在 JavaScript 中,函数声明会被提升到其作用域的顶部。)
“Variables declared with 'var' are hoisted, but those with 'let' and 'const' are not.”
(使用 'var' 声明的变量会被提升,但 'let' 和 'const' 声明的变量不会。)
❶ 在物理或工程中,指使用机械装置将物体从低处移动到高处的动作。
“They hoisted the sail to catch the wind.”
(他们升起船帆以捕捉风力。)
“The workers hoisted the heavy crate onto the truck.”
(工人们将沉重的箱子吊到卡车上。)
常见短语
hoisting mechanism — 指编程中变量和函数声明被提升到作用域顶部的机制。
“The hoisting mechanism in JavaScript can be tricky for new developers.”
(JavaScript 中的提升机制对新开发者来说可能很棘手。)
hoisting equipment — 用于提升重物的机械设备,如起重机或绞车。
“The construction site was equipped with various hoisting equipment.”
(建筑工地配备了各种提升设备。)