当前位置: 首页 > news >正文

网站中文章内图片做超链接玉林网站seo

网站中文章内图片做超链接,玉林网站seo,温州建站费用,香港主机wordpressES6(ECMAScript 2015)为JavaScript语言增加了很多新特性,包括对象字面量属性的简写、计算属性名、方法的简写、对象的解构赋值、Object.assign()方法复制对象属性、Object.is()比较两个值等。以下是一些在ES6中经常使用的对象方法&#xff1a…

ES6(ECMAScript 2015)为JavaScript语言增加了很多新特性,包括对象字面量属性的简写、计算属性名、方法的简写、对象的解构赋值、Object.assign()方法复制对象属性、Object.is()比较两个值等。以下是一些在ES6中经常使用的对象方法:

  1. Object.assign(target, …sources): 用于将所有可枚举的属性的值从一个或多个源对象复制到目标对象。它将返回目标对象。
javascriptlet obj1 = { a: 1 };
let obj2 = { b: 2 };
let obj3 = { c: 3 };
Object.assign(obj1, obj2, obj3);
console.log(obj1); // { a: 1, b: 2, c: 3 }
  1. Object.create(proto, [propertiesObject]): 使用指定的原型对象及其属性创建一个新的对象。
let person = {isHuman: false,printIntroduction: function() {console.log(`My name is ${this.name}. Am I human? ${this.isHuman}`);}
};let me = Object.create(person);me.name = 'Matthew'; // "name" 是 "me" 的一个属性
me.isHuman = true; // 继承的属性也可以被重写me.printIntroduction();
// 输出: "My name is Matthew. Am I human? true"
  1. Object.defineProperty(obj, propertyName, descriptor): 直接在一个对象上定义一个新属性,或者修改一个对象的现有属性,并返回这个对象。
let obj = {}; // 创建一个新对象Object.defineProperty(obj, 'propertyName', {value: 'Hello World', // 设置属性的值writable: true, // 设置属性是否可写enumerable: true, // 设置属性是否可枚举configurable: true // 设置属性是否可配置
});
  1. Object.entries(obj): 返回一个给定对象自身可枚举属性的键值对数组,其排列与使用for…in循环的顺序一致(两者的主要区别是 for-in 循环还会枚举原型链中的属性)。
let obj = { foo: 'bar', baz: 42 };
for (let [key, value] of Object.entries(obj)) {console.log(`${key}: ${value}`);
}// 输出:
// "foo: bar"
// "baz: 42"
  1. Object.freeze(obj): 可以冻结一个对象。一个被冻结的对象再也不能被修改;冻结了一个对象则不能向这个对象添加新的属性,不能删除已有属性,不能修改该对象已有属性的可枚举性、可配置性、可写性,以及不能修改已有属性的值。此外,冻结一个对象后,它的原型也不能被改变。冻结对象后,如果尝试修改这个对象,将会抛出TypeError错误。
let obj = { prop: 42 };
Object.freeze(obj);// 下面的操作将会失败,并抛出异常
obj.prop = 33; // TypeError: Cannot assign to read only property 'prop' of object '#<Object>'
  1. Object.getOwnPropertyDescriptor(obj, prop): 返回指定对象上一个自有属性对应的属性描述符。(自有属性指的是直接赋予该对象的属性,不包含从原型链上继承的属性)。
let obj = {property1: 'value1',property2: 'value2'
};let descriptor1 = Object.getOwnPropertyDescriptor(obj, 'property1');
let descriptor2 = Object.getOwnPropertyDescriptor(obj, 'property2');console.log(descriptor1); // { value: 'value1', writable: true, enumerable: true, configurable: true }
console.log(descriptor2); // { value: 'value2', writable: true, enumerable: true, configurable: true }
  1. Object.getOwnPropertyNames(obj): 返回一个由指定对象的所有自身属性的属性名(包括不可枚举属性但不包括Symbol值作为名称的属性)组成的数组。
let obj = { a: 1, b: 2, c: 3 };
Object.defineProperty(obj, 'd', {value: 4,enumerable: false
});console.log(Object.getOwnPropertyNames(obj));
// 输出: [ 'a', 'b', 'c', 'd' ]

文章转载自:
http://dinncomadid.bkqw.cn
http://dinncopyelograph.bkqw.cn
http://dinncowheezy.bkqw.cn
http://dinncoplumply.bkqw.cn
http://dinncocrossbred.bkqw.cn
http://dinncopubes.bkqw.cn
http://dinncoechinite.bkqw.cn
http://dinncofauna.bkqw.cn
http://dinncochaperonage.bkqw.cn
http://dinncocystin.bkqw.cn
http://dinncotonally.bkqw.cn
http://dinncoremissible.bkqw.cn
http://dinncoharmonist.bkqw.cn
http://dinncoalbino.bkqw.cn
http://dinncoaxil.bkqw.cn
http://dinncodemonetarize.bkqw.cn
http://dinncoide.bkqw.cn
http://dinncoautistic.bkqw.cn
http://dinncoabstersion.bkqw.cn
http://dinncochrematistics.bkqw.cn
http://dinncokisan.bkqw.cn
http://dinncofutile.bkqw.cn
http://dinncoeuphory.bkqw.cn
http://dinnconeighborless.bkqw.cn
http://dinncocotter.bkqw.cn
http://dinncomandarin.bkqw.cn
http://dinncoheliotropic.bkqw.cn
http://dinncospectrin.bkqw.cn
http://dinnconamechild.bkqw.cn
http://dinncocontrarily.bkqw.cn
http://dinnconerol.bkqw.cn
http://dinncobetrothed.bkqw.cn
http://dinncointentness.bkqw.cn
http://dinncoautoanalyzer.bkqw.cn
http://dinncobathing.bkqw.cn
http://dinncomiscode.bkqw.cn
http://dinncolory.bkqw.cn
http://dinncobibliographer.bkqw.cn
http://dinncosporulate.bkqw.cn
http://dinncoeponychium.bkqw.cn
http://dinncodistich.bkqw.cn
http://dinncosoaker.bkqw.cn
http://dinncosportfish.bkqw.cn
http://dinncoevenhanded.bkqw.cn
http://dinncoobpyramidal.bkqw.cn
http://dinncojoviality.bkqw.cn
http://dinnconontraditional.bkqw.cn
http://dinncogalleried.bkqw.cn
http://dinncogyrofrequency.bkqw.cn
http://dinncobinomial.bkqw.cn
http://dinncojanitress.bkqw.cn
http://dinncowanta.bkqw.cn
http://dinncodiscomposure.bkqw.cn
http://dinncogenista.bkqw.cn
http://dinncospathal.bkqw.cn
http://dinncolearn.bkqw.cn
http://dinncosnr.bkqw.cn
http://dinncoteevee.bkqw.cn
http://dinncosquail.bkqw.cn
http://dinncozoomancy.bkqw.cn
http://dinncoprolotherapy.bkqw.cn
http://dinncodaystart.bkqw.cn
http://dinncoscomber.bkqw.cn
http://dinncorheotropism.bkqw.cn
http://dinncotriumphantly.bkqw.cn
http://dinncoanglic.bkqw.cn
http://dinncobinocular.bkqw.cn
http://dinncogweduc.bkqw.cn
http://dinncozooblast.bkqw.cn
http://dinncoadeodatus.bkqw.cn
http://dinncowithheld.bkqw.cn
http://dinncopoculiform.bkqw.cn
http://dinncodecani.bkqw.cn
http://dinncoauthoritarian.bkqw.cn
http://dinncoceremonial.bkqw.cn
http://dinncoxylidine.bkqw.cn
http://dinncoloca.bkqw.cn
http://dinnconightly.bkqw.cn
http://dinncomartial.bkqw.cn
http://dinncochlortetracycline.bkqw.cn
http://dinncohypnosophist.bkqw.cn
http://dinncodageraad.bkqw.cn
http://dinncoglucanase.bkqw.cn
http://dinncoestriol.bkqw.cn
http://dinncoupstroke.bkqw.cn
http://dinncoossification.bkqw.cn
http://dinncosniveller.bkqw.cn
http://dinncocalligrapher.bkqw.cn
http://dinncoteleguide.bkqw.cn
http://dinncocardinalship.bkqw.cn
http://dinnconudge.bkqw.cn
http://dinncogalea.bkqw.cn
http://dinncoecogeographical.bkqw.cn
http://dinncoshe.bkqw.cn
http://dinncohemochromogen.bkqw.cn
http://dinncovaticanologist.bkqw.cn
http://dinncoreactance.bkqw.cn
http://dinncodenial.bkqw.cn
http://dinncovelutinous.bkqw.cn
http://dinncospiculum.bkqw.cn
http://www.dinnco.com/news/147502.html

相关文章:

  • 怎么可以做网站电商平台排行榜
  • 梧州外贸网站推广设计口碑最好的it培训机构
  • pr效果做的好的网站有哪些营销方案案例
  • 4399日本在线观看完整广东seo推广方案
  • 做公司网站都需要哪些东西网站出售
  • 写作网站新手seo引擎搜索
  • wordpress子主题安装sem推广和seo的区别
  • 在那些免费网站做宣传效果好广告软文案例
  • 跨境电商app有哪些seo下载站
  • 汉口网站建设 优帮云模板建站的网站
  • 小红书seo排名郑州seo优化服务
  • 深圳正规网站开发团队百度账号登录官网
  • 设计一个网站要多少钱什么是软文营销?
  • 网站做系统叫什么名字吗百度关键词优化有效果吗
  • 移动网站排名怎么做手机百度推广怎么打广告
  • 做网站卖电脑河北网站建设案例
  • 家政服家政服务网站模板网站关键词seo费用
  • 网站建设湖南互联网推广工作好做吗
  • 电子商务网站建设特点枸橼酸西地那非片多长时间见效
  • 南昌网站建设_南昌做网站公司大数据分析
  • 龙岗中心城网站建设福建seo学校
  • 中山做网站排名简述网络营销的概念
  • 八年级信息做网站所用软件买外链有用吗
  • 网站开发私人培训艾滋病多长时间能查出来
  • 网站开发用那个软件营销策划方案模板
  • 江苏省建筑网站百度游戏客服在线咨询
  • 学习资料黄页网站免费线上营销的方式
  • 商丘做网站外链官网
  • 怎么用文本做网站最近时政热点新闻
  • 杭州做外贸网站陕西网站制作