LoginSignup
2
0

More than 3 years have passed since last update.

JavaScriptのオブジェクトに関する文法

Last updated at Posted at 2020-02-26
const customer = {name: "taro", age: 22};
const {name, age} = customer;

console.log(name);
console.log(age);

// output 
// taro
// 22
const name = "taro";
const age = 22;

console.log({name,age});
// output
// { name: 'taro', age: 22 }
2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0