Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function message(firstname, lastname, phonenumber, mID){
  2.  
  3.     this.getText = function(){
  4.         return "  Namn: " + firstname + ".  Efternamn: " + lastname + ".  Telefon: " + phonenumber;
  5.     };
  6.  
  7.  
  8.     this.getDate = function (){
  9.         return date;
  10.     }
  11.    
  12.     this.getmID = function(){
  13.         return mID;
  14.     };
  15.     //behövs egentligen inte.
  16.      this.setmID = function (mID) {
  17.         mID = mID;
  18.  
  19.     };
  20.    
  21.     this.setDate = function(_date){
  22.         date = _date;
  23.     };
  24.  
  25.  
  26.    
  27.     this.setText = function(text){
  28.         message = text;
  29.     };
  30.  
  31.    
  32.  
  33.  
  34.     message.prototype.toString = function(){
  35.         return this.getText();
  36.     };
  37.    
  38.    
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement