Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Any mc.getStorageSync(String key)

mc.getStorage 的同步版本

参数

参数类型默认值必填说明
keyString是本地缓存中指定的 key

返回值

类型说明
Anykey对应的内容

key对应的内容

示例代码:

console.log(mc.getStorageSync('key'));