Books
Exercises
Courses
Quizzes
Snippets
Tools
Change theme
Quizzez
HTML Basic
CSS Basic
Javascript Basic
PHP basic
ES6 Basic
TypeScript Basic
Angular Basic
React Basic
Sass Basic
Vue.js Basic
Git Basic
SQL Basic
Quiz Javascript Basic - Which of the following is the correct way to write an array?
Which of the following is the correct way to write an array?
let fruits = new Array(1:"apple",2:"peach",3:"banana"); aaa
let fruits = new Array:1=(" apple ")2=("peach")3=("banana"); aaa
let fruits = new Array("apple ","peach","banana"); aaa
let fruits = new Array="apple","peach","banana"; aaa
Answer
Your answer is correct
Your answer is incorrect
Start Quiz
Sorry about that
How can we improve it?
Thanks for your feedback!
Thanks for your feedback!
Do you find this helpful?
Yes
No
Related Questions
Inside which element do you put JavaScript?
How do you write "Hello W3docs" in an alert box?
Which is the correct way to write a comment in JavaScript?
How can you detect the application name of the client’s browser?
What is the value of "elem" variable?
How do you declare a new date in JavaScript?
How do you get cookies in JavaScript?
How do you create a new function in JavaScript?
How do you create a JavaScript array?
Can you set any style to HTML tag using JavaScript?
Which of the following is the correct way to write an array?
Which of the following is the correct way to write “Welcome to W3docs” on the web page?
Which of the following does the pop() method do?
What will be the result of the following code snippet?
What is a closure?
What should be done for lexical scoping implementation?
Which of the following options is the opposite of the lexical scoping?
What will be the output of the following statement?
Which of the following is used for assigning a value to a variable?
What will happen if the return statement doesn’t have the associated expression?