Greggi made a post about rebol and javascript here http://blog.revolucent.net/2009/05/javascript-rebol.html
But since I'm going to compare javascript and rebol more deeply, I donβt see what is equivalent to rebol for a javascript prototype. Since extending an instance of an object from another with make to rebol is not very similar to the javascript prototype property, because the js prototype allows ALL instances to be distributed at the same time.
I am mistaken or there is a code equivalent below for rebol:
<html>
<head>
</head>
<body>
<script>
function Person(firstName, lastName, sex) {
this.firstName = firstName;
this.lastName = lastName;
this.whoAreYou = function() {
alert( "I've been built with Constructor and my name is " + this.firstName + " " + this.lastName);
}
this.WhatIsYourSex = function() {
alert(this.sex);
}
};
Person.prototype.sex = "Man";
</script>
<script>
JaneDoe = new Person("Jane", "Doe");
JaneDoe.whoAreYou();
JaneDoe.WhatIsYourSex();
alert("Are you sure?");
JaneDoe.sex = "Woman";
JaneDoe.WhatIsYourSex();
</script>
</body>
</html>
: , , . R2, . INSTANCE, : , js.
, :
Rebol AUTOMATICALLY ALL INSTANCES , , javascript, , ?
R2 R3 , , , , , , . , jquery, ? .