Disclaimer: I'm extremely new to javascript but this is my line of thought, I want to create a random password generator and I want to store all the possible variables in a single array. So for example I want the array to end up looking like this:
var characters = [
{
numbers: ("0", "1", "2", "3", "4" , "5", "6" , "7", "8", "9"),
specialChar: ("!", "%", "&", ",", "*", "+", "-", ".", "/", "<", ">", "?","~"),
upprCase: ("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"),
lowrCase: ("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"),
My goal is to be able to reference this as a global array and from there create a function to randomize the values inside the array and return the newly generated password. I'm not asking for anyone to make this I just want to know if this line of thinking will work.
[ { numbers: ("0",<-- that(is not an array. It is unclear why you have the [] around the object.