Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is single line JavaScript comment
- /* This is multi line
- JavaScript comment */
- // defining variable
- var fullname;
- // getting input
- fullname = prompt("What is your full name.");
- // Three method of defining array.
- var countries = ["India", "Russia", "China"];
- var countries = Array("India", "Russia", "China");
- var countries = new Array("India", "Russia", "China");
- // There is a fourth way also.
- var countries = [];
- countries.push("India");
- countries.push("Russia");
- countries.push("China");
Advertisement
Add Comment
Please, Sign In to add comment