object properties and methods in javascript | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

object properties and methods in javascript

what is the difference between the use of object properties and object method in javascript?

28th May 2018, 1:22 PM
ROBOKIT
ROBOKIT - avatar
1 Réponse
+ 3
object properties represent the state of an object and object method represents the behavior of that object. example: Suppose you have a Student object, its property could be name which represents the name of that student and its method could be to enroll in a course which represents the behavior of that student.
28th May 2018, 1:26 PM
Yousaf
Yousaf - avatar