#7 Javascript Objects | Javascript Hindi Course For Beginners ( 2023 )

A JavaScript object is a collection of named values.
In Simple words Object is used to stored multiple data in single variable.
 

How to Create Objects

How to access values in object

How to update and create value in object

We can also use function inside object

Constructor function

How to duplicate object

How to loop over Objects

Object Methods
 
 

Questions

 
Question 1
Upvotes vs Downvotes
Given an object containing counts of both upvotes and downvotes, return what vote count should be displayed. This is calculated by subtracting the number of downvotes from upvotes.
@Matt
 
Question 2
50-30-20 Strategy
The 50-30-20 strategy is a simple way to budget, which involves spending 50% of after-tax income on needs, 30% after tax income on wants, and 20% after-tax income on savings or paying off debt.
Given the after-tax income as ati, what you are supposed to do is to make a function that will return an object that shows how much a person needs to spend on needs, wants, and savings.
@Werdna
 
 
Question 3
Extract City Facts
Create a function that takes an object as an argument and returns a string with facts about the city. The city facts will need to be extracted from the object's three properties:
  1. name
  1. population
  1. continent
The string should have the following format: X has a population of Y and is situated in Z (where X is the city name, Y is the population and Z is the continent the city is situated in).
@jjberg