Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How can you read properties of an Object in JavaScript?
Home
JavaScript
How can you read properties of an Object in JavaScript?
0
votes
asked
Oct 19, 2019
in
JavaScript
by
SakshiSharma
How can you read properties of an Object in JavaScript?
properties-javascript
javascript-properties
properties-of-javascript
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 19, 2019
by
rajeshsharma
You can write and read properties of an object using the dot notation as follows −
// Getting object properties
emp.name // ==> Zara
emp.age // ==> 10
// Setting object properties
emp.name = "Daisy" // <== Daisy
emp.age = 20 // <== 20
Related questions
0
votes
Q: What is arguments object in JavaScript?
asked
Oct 19, 2019
in
JavaScript
by
SakshiSharma
javascript-object
object-in-javascript
properties-javascript
0
votes
Q: How do you define multiple properties on an object in Javascript?
asked
Oct 13, 2023
in
JavaScript
by
GeorgeBell
javascript-interview-questions-answers
0
votes
Q: How do you copy properties from one object to other in Javascript?
asked
Oct 8, 2023
in
JavaScript
by
JackTerrance
javascript-interview-questions-answers
+1
vote
Q: How to add/remove properties to object dynamically in Javascript?
asked
Jul 16, 2019
in
JavaScript
by
Indian
#java-script
0
votes
Q: What are the various url properties of location object in Javascript?
asked
Oct 4, 2023
in
JavaScript
by
GeorgeBell
javascript-interview-questions-answers
0
votes
Q: In JavaScript, object is a container of properties and functions. Properties are identified by ____ and behavior is identified by
asked
Feb 6, 2020
in
JavaScript
by
rajeshsharma
#javascript-variables
0
votes
Q: How do you list all properties of an object?
asked
Oct 15, 2023
in
JavaScript
by
GeorgeBell
javascript-interview-questions-answers
0
votes
Q: How can you create an Object in JavaScript?
asked
Oct 19, 2019
in
JavaScript
by
SakshiSharma
javascript-object
object-in-javascript
0
votes
Q: How can you use JavaScript to read a cookie?
asked
Sep 19, 2021
in
JavaScript
by
sharadyadav1986
javascript-cookie
cookie-read
0
votes
Q: How do you check an object is a promise or not Javascript?
asked
Oct 24, 2023
in
JavaScript
by
DavidAnderson
javascript-interview-questions-answers
...