PART 34 - JavaScript - class and encapsulation - To be continued in Part 35....

preview_player
Показать описание
In this video I've shown how to create class in javascript. Creating class is all about encapsulating related members (both properties and methods)
Рекомендации по теме
Комментарии
Автор

A small suggestion, from 5:15 to 6:21, in this part of the video, you are printing the values.

To console log the functions walk & speak just use:

per1.walk() // o/p: walk
per1.speak() // o/p: speak

Putting them in console.log() gives 2 outputs.

Ex. console.log(per1.walk())

o/p will be:
Walk
undefined

Hit Like, if you agree :P

mailanandteerth
Автор

Where is the encapsulation concepts in this vedios ?

kashimallarajesh
join shbcf.ru