const favorite = {music: "HIPHOP", food: "sushi", season: "autumn" }
最後のseasonのvalueを取得したい場合
const lastValue = Object.values(favorite)[Object.values(favorite).length - 1]; // "autumn"
Go to list of users who liked
More than 3 years have passed since last update.
const favorite = {music: "HIPHOP", food: "sushi", season: "autumn" }
最後のseasonのvalueを取得したい場合
const lastValue = Object.values(favorite)[Object.values(favorite).length - 1]; // "autumn"
Register as a new user and use Qiita more conveniently
Go to list of users who liked