how to crate a list in java script

Java
var list = [1 ,2 ,"apple",true];
Source

Also in Java: