Random Password Generator

Random Password Generator

Write a function that generates a random password.

  • The function should have a parameter that dictates the length of the password.
  • The function may contain any upper and lower case characters.
  • The function may contain any numbers and symbols.


function randomPasswordGenerator(number) {
    //creates a password
    //number specifies length
//Returns a password with the length of 5
//Example: s*3Lj

Extra credit

  • The password should have an additional parameter that accepts a string as an argument, whose characters are all found within the generated password.