博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
entry类型的对象_对象entry()方法
阅读量:2504 次
发布时间:2019-05-11

本文共 592 字,大约阅读时间需要 1 分钟。

entry类型的对象

Introduced in ES2017.

ES2017ES2017

This method returns an array containing all the object own properties, as an array of [key, value] pairs.

此方法以[key, value]对的数组形式返回一个包含所有对象自身属性的数组。

Usage:

用法:

const person = { name: 'Fred', age: 87 }Object.entries(person) // [['name', 'Fred'], ['age', 87]]

also works with arrays:

也可用于数组:

const people = ['Fred', 'Tony']Object.entries(people) // [['0', 'Fred'], ['1', 'Tony']]

You can use it to count the number of properties an object contains, combined with the length property of the array.

您可以使用它来计算对象包含的属性数量,以及数组的length属性。

翻译自:

entry类型的对象

转载地址:http://rlqgb.baihongyu.com/

你可能感兴趣的文章
VTP
查看>>
Linux内核分析第一周——计算机是如何工作的
查看>>
Windows 自动启动 bat
查看>>
不规则按钮,支持普通Button,Radio Button, Check Button
查看>>
【C语言】模拟实现库函数strcat函数
查看>>
用newLISP读取Hive的元数据
查看>>
模式识别 - libsvm该函数的调用方法 详细说明
查看>>
数据库启动(下一个)
查看>>
FineUI第九天---表单验证
查看>>
Unity3D 快捷键
查看>>
Springboot集成WebSocket通信全部代码,即扣即用。
查看>>
接口,lambda表达式与内部类
查看>>
【poj1009】 Edge Detection
查看>>
【spoj LCS2】 Longest Common Substring II
查看>>
去掉PowerDesigner生成SQL脚本中字段名带的引号
查看>>
win10操作系统安装oracle11g时出现不满足最低配置的操作INS13001
查看>>
中文乱码问题(页面乱码,eclipse乱码,请求响应乱码)
查看>>
extern使用方法总结!(转)
查看>>
HTTP请求过程详解
查看>>
【C#】wpf中的xmlns命名空间为什么是一个网址,代表了什么意思(转载)
查看>>