SoFunction
Updated on 2025-04-10

Example of prototype usage in js


<script type="text/javascript">
function people(name){
=name;
=function(){ //Object method
alert("my name is"+);
}
}

=function(){ //Class method
alert("i can run");
}

=function(){ //Prototype method
alert("i can jump")
}

var p1=new people("vincent");
();
(); //static in c#
();
</script>