Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript: Public, Private, Protected

I always thought "Public", "Private", and "Protected" keywords were for PHP or Java, not JavaScript but just found out these are reserved words.

Can anyone give me an example of how or when to use these particular reserved words because I have never seen or used them in JavaScript but would like to know when to use them.

Thank you

like image 718
codelove Avatar asked Nov 08 '13 20:11

codelove


1 Answers

These are reserved for possible future use. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words

like image 132
Drew R Avatar answered Sep 30 '22 16:09

Drew R