1

For example

let firstName = 'James';
let lastName = 'Brown';

let person = { firstName, lastName }

// which creates a person object that looks like
{ firstName: 'James', lastName: 'Brown' }

My question is what is what I'm doing here called?

Sebastian Simon
  • 18,263
  • 7
  • 55
  • 75
Bui
  • 11
  • 1
  • 5
    [Short-hand notation](//developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#new_notations_in_ecmascript_2015)? – Sebastian Simon Jul 08 '21 at 14:41
  • @SebastianSimon - thank you! I was suggesting to someone to do this and realized I had no idea what it's called. – Bui Jul 08 '21 at 14:46

0 Answers0