bebo231312312321

Untitled

Apr 10th, 2023
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function employee(data) {
  2.     let n = data.shift();
  3.     let path = /([A-Z][a-z]{2,} [A-Z][a-z]{2,})#+((([A-Z][a-z]+)&([A-Z][a-z]+)&([A-Z][a-z]+))|([A-Z][a-z]+)|(([A-Z][a-z]+)&([A-Z][a-z]+)))\d{2}([A-Z]\w+ (Ltd.|JSC))/;
  4.  
  5.     let result = [];
  6.  
  7.     for (let i = 0; i < n; i++) {
  8.  
  9.         let match = path.exec(data[i]);
  10.         result.push(match);
  11.     }
  12.  
  13.     for (let element of result) {
  14.         if (element !== null) {
  15.             let job = (element[2]).split('&').join(' ');
  16.             console.log(`${element[1]} is ${(job)} at ${element[11]}`);
  17.         }
  18.     }
  19. }
Add Comment
Please, Sign In to add comment