set a variable to a list javascript code example Example: how to make an array in javascript var names = ["Sanjith", "Pranav", "Aadya", "Saharsh"]