Advertisement
daniel_c05

Classes

Feb 15th, 2012
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Some random Classes and properties extraction examples
  2.  
  3. function Account (holder, cardType, limit, interest, boolean, dateOfBirth) {
  4.     this.accountHolder = holder;
  5.     this.cardType = cardType;
  6.     this.dateOfBirth = dateOfBirth;
  7.     var creditLimit = limit;
  8.     var interestRate = interest;
  9.     var membershipFee = boolean;
  10.     this.accountVerified = function (name, dob) {
  11.     if (name === this.accountHolder || dob === this.dateOfBirth) {
  12.         console.log("Thank you for verifying the information");
  13.         //getChar();
  14.         console.log("The account's credit limit is " + creditLimit);
  15.         console.log("The account's APR is " + interestRate);
  16.         if (membershipFee === true) {
  17.         console.log("The account does have a membership fee");
  18.         }
  19.         else {
  20.         console.log("The account does not have a membership fee");
  21.         }
  22.     }
  23.     };
  24. }
  25. var myCard = new Account("Daniel Alvarado", "Mastercard", 3500, 0.24, false, "04/11/1991");
  26.  
  27. myCard.accountVerified("Daniel Alvarado", "04/11/1991");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement