Javascript: way to implement 100% tamperproof private variables?
<p>I was reading Crockford's tutorial <a href="http://javascript.crockford.com/private.html" rel="nofollow">http://javascript.crockford.com/private.html</a>.
private variables are implemented by function inside constructor that makes possible to associate private variables to closure.</p>

<p>Generally javascript libraries are open, so <b>anyone can see and modify the private variables by modifying the inner function of constructor thru instances/objects</b>. like this:
<b>c1.radius = function (){return 500;};</b></p>

<p>Be more precisly: <b>In real OOPS no one can modify private variable by objects but here we can.</b></p>

<p>Can anyone please suggest me the way to make it full tamper proof like JAVA or C?</p>

<pre><code>function Circle(radius) {

this.radius = function(){ return radius;}

}

Circle.prototype = {
   constructor: Circle,
   area: function(){
       return (Math.PI)* (Math.pow(this.radius(),2));
   }
};

c1 = new Circle(5);
console.log(c1.radius());
console.log(c1.area());
c1.radius = function (){return 500;};
</code></pre>
