- ES6 Enhanced object literal syntax can take an external object like salary object and make it a property of the developer object as shown below:
const salary = {
fixed: '$200k',
variable: '$100k'
}
const developer = {
// salary: salary // Before ES6
salary // ES6 way
}
developer; // { salary: { fixed: '$200k', variable: '$100k' } }
- If any change is made in salary object, same change needs to be made inside the developer object for salary object which is present as property of developer object.
Second way:
We don't need to create a property & then set it to function expression. We can write that directly without function keyword as shown below i.e ES6 Way.
We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.
Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.
Top comments (0)