Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function message(firstname, lastname, phonenumber){
- this.getText = function(){
- return " Namn: " + firstname + ". Efternamn: " + lastname + ". Telefon: " + phonenumber;
- };
- // Slumpar random nummer för ett unikt id.
- this.getrandom = function(){
- return Math.round(Math.random() * 10000);
- };
- this.setText = function(text){
- message = text;
- };
- this.setrandom = function(text){
- message = text;
- };
- message.prototype.toString = function(){
- return this.getText();
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement