SHARE
TWEET

Untitled

a guest Feb 14th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         var pickRandomWords = function (words) {
  2.             return words[Math.floor(Math.random() * words.length)];
  3.         }
  4.    
  5.         var choiceGender = prompt('U gender ?');
  6.  
  7.         var maleNames = ['Andry', 'Abraham', 'Arnold', 'Arnold', 'Carl', 'Donald', 'Gabriel', 'Gerald', 'John'];
  8.         var famaleNames = ['Adriana', 'Ana', 'Catherine', 'Ellen', 'Tina', 'Victoria', 'Pat', 'Maureen'];
  9.  
  10.         if (choiceGender === 'Male' || 'male' || 'man' || 'Man') {
  11.             alert('Are you ' + pickRandomWords(maleNames));
  12.         } else if (choiceGender === 'Famale' || 'famale' || 'woman' || 'Woman' ) {
  13.             alert('Are you ' + pickRandomWords(famaleNames));
  14.         } else {
  15.             console.log('no');
  16.         }
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
Top