SHARE
TWEET

Untitled

a guest Mar 24th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const assert = require('assert');
  2.  
  3. // ... Ton code ici ...
  4. class BankCustomer {
  5.     constructor(name, code) {
  6.         let codePin = code
  7.         let nameOfPersonne = name
  8.         this.getName = () => nameOfPersonne
  9.         this.verifyPinInput = (input) => {
  10.             if (codePin === input) {
  11.                 return true
  12.             } else {
  13.                 return false
  14.             }
  15.         }
  16.     }
  17. }
  18. // Tests
  19. const customer = new BankCustomer('John Doe', '3579');
  20. assert.equal(typeof customer.getName, 'function');
  21. assert.equal(typeof customer.verifyPinInput, 'function');
  22. assert.equal(customer.getName(), 'John Doe');
  23. assert.ok(customer.verifyPinInput('3579'));
  24.  
  25. console.log(customer.code)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top