オブジェクトの場合
const obj = {'a':'A','b':'B'}
const firstEle = Object.keys(obj)[0]
配列の場合
const arr = ['a','b']
const firstEle = arr.shift()
More than 5 years have passed since last update.
オブジェクトの場合
const obj = {'a':'A','b':'B'}
const firstEle = Object.keys(obj)[0]
配列の場合
const arr = ['a','b']
const firstEle = arr.shift()
Register as a new user and use Qiita more conveniently