Question

1. What is the correct way to write a JavaScript array? var colors = (1:"red", 2:"green",...

1. What is the correct way to write a JavaScript array?

  1. var colors = (1:"red", 2:"green", 3:"blue")
  2. var colors = ["red", "green", "blue"]
  3. var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
  4. var colors = "red", "green", "blue"

2. Which event occurs when the user clicks on an HTML element?

  1. onclick
  2. onmouseover
  3. onchange
  4. onmouseclick

3. How do you declare a JavaScript variable?

  1. v carName;
  2. var carName;
  3. variable carName;

4. Javascript is

  1. A client-side scripting language that is interpreted by the browser
  2. A server-side scripting language that is executed by the server
  3. A language for creating self-contained, Windows-only programs
  4. A programming language used solely to create apps that run on Apple’s iPad
  5. All of the above are true

5. Which of the following is true regarding JavaScript?

  1. JavaScript is a full-fledged compiled, object-oriented language.
  2. JavaScript runs directly inside the browser without the need for the JVM.
  3. JavaScript is popular for its ability to run on any platform with a JVM installed.
  4. JavaScript is object oriented in that the objects in JavaScript are class-based.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1 b

var colors = ["red", "green", "blue"]

2 a ) onclick

3 b var carName;

4 a A client-side scripting language that is interpreted by the browser

5 JavaScript runs directly inside the browser without the need for the JVM

Add a comment
Know the answer?
Add Answer to:
1. What is the correct way to write a JavaScript array? var colors = (1:"red", 2:"green",...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT