trim()
function trim(str) {
return str.replace(/^\s*/, '').replace(/\s*$/, '');
}
getPrototypeOf 要返回其原型的对象
const prototype1 = {};
const object1 = Object.create(prototype1);
console.log(Object.getPrototypeOf(object1) === prototype1);
// expected output: true