Java script: 22 MCQs

All 22 multiple-choice questions from this kit, free and with no sign-up.

Warm-up · 9 questions

Q1. JavaScript માં variable declare કરવા માટે નીચેનામાંથી કયો keyword વપરાય છે?

Beginner
A int
B float
C var
D string

Answers and explanations are in the Veda app.

Q2. JavaScript function ને define કરવા માટે નીચેનામાંથી કયો syntax સાચો છે?

Beginner
A func myFunction() {}
B function: myFunction() {}
C function myFunction() {}
D def myFunction() {}

Answers and explanations are in the Veda app.

Q3. JavaScript માં array માં પ્રથમ element નો index શું છે?

Beginner
A 1
B 0
C -1
D undefined

Answers and explanations are in the Veda app.

Q4. JavaScript function માં parameters કેવી રીતે pass કરવામાં આવે છે?

Beginner
A function name પછી angle brackets માં
B function name પછી curly braces માં
C function name પછી parentheses માં
D function name પછી square brackets માં

Answers and explanations are in the Veda app.

Q5. JavaScript માં 'boolean' ડેટા ટાઈપ કેટલી values લઈ શકે છે?

Beginner
A ત્રણ: true, false, અને null
B બે: true અને false
C ચાર: true, false, 0, અને 1
D એક: true

Answers and explanations are in the Veda app.

Q6. JavaScript માં 'undefined' શું દર્શાવે છે?

Beginner
A variable declare જ નથી થયો
B variable declare થયો પણ value assign નથી
C variable ની value 0 છે
D variable ની value null છે

Answers and explanations are in the Veda app.

Q7. JavaScript માં 'string' ડેટા ટાઈપ માટે કયા quotes વાપરી શકાય છે?

Beginner
A માત્ર single quotes
B માત્ર backticks
C double, single, અને backticks
D માત્ર double quotes

Answers and explanations are in the Veda app.

Q8. JavaScript માં 'var' keyword વડે declare કરેલ variable ને reassign કરી શકાય છે.

Beginner
A True
B False

Answers and explanations are in the Veda app.

Q9. JavaScript માં 'number' ડેટા ટાઈપ integer અને float બંનેને આવરી લે છે.

Beginner
A True
B False

Answers and explanations are in the Veda app.

Building up · 8 questions

Q10. JavaScript માં 'null' ડેટા ટાઈપ શું દર્શાવે છે?

Intermediate
A એક intentional absence of any object value
B એક undefined value
C એક boolean false
D એક ખાલી string

Answers and explanations are in the Veda app.

Q11. JavaScript માં '===' ઓપરેટર શું કરે છે?

Intermediate
A value અને data type બંનેની સરખામણી કરે છે
B માત્ર value ની સરખામણી કરે છે
C માત્ર data type ની સરખામણી કરે છે
D value ને string માં convert કરીને સરખામણી કરે છે

Answers and explanations are in the Veda app.

Q12. JavaScript માં 'typeof' ઓપરેટર શું રિટર્ન કરે છે?

Intermediate
A variable ની length
B variable નું name
C variable નો data type string તરીકે
D variable ની value

Answers and explanations are in the Veda app.

Q13. JavaScript માં 'NaN' શું દર્શાવે છે?

Intermediate
A New Array Number
B Not a Number
C Null and Null
D Negative Number

Answers and explanations are in the Veda app.

Q14. JavaScript માં 'const' keyword વડે declare કરેલ variable ની value બદલી શકાય છે?

Intermediate
A હા, પરંતુ માત્ર function ની અંદર
B હા, કોઈપણ સમયે
C ના, પરંતુ તેનો data type બદલી શકાય છે
D ના, તે constant છે અને reassign કરી શકાતી નથી

Answers and explanations are in the Veda app.

Q15. JavaScript function માં 'return' statement વગર function શું રિટર્ન કરે છે?

Intermediate
A false
B 0
C null
D undefined

Answers and explanations are in the Veda app.

Q16. JavaScript function માં 'return' statement પછી કોઈ code execute થતો નથી.

Intermediate
A True
B False

Answers and explanations are in the Veda app.

Q17. JavaScript માં 'let' keyword વડે declare કરેલ variable ને function ની બહારથી access કરી શકાય છે.

Intermediate
A True
B False

Answers and explanations are in the Veda app.

Topper level · 5 questions

Q18. JavaScript માં 'let' અને 'var' વચ્ચેનો મુખ્ય તફાવત શું છે?

Advanced
A બંને સરખા છે
B 'let' block-scoped છે, 'var' function-scoped છે
C 'let' function-scoped છે, 'var' block-scoped છે
D 'let' global-scoped છે, 'var' local-scoped છે

Answers and explanations are in the Veda app.

Q19. JavaScript માં 'function expression' શું છે?

Advanced
A function ને parameter તરીકે pass કરવું
B function ને name આપવું
C function ને return કરવું
D function ને variable માં assign કરવું

Answers and explanations are in the Veda app.

Q20. JavaScript માં 'typeof null' શું રિટર્ન કરે છે?

Advanced
A 'boolean'
B 'undefined'
C 'object'
D 'null'

Answers and explanations are in the Veda app.

Q21. JavaScript માં 'NaN' એ 'typeof' ઓપરેટર વડે 'number' રિટર્ન કરે છે.

Advanced
A True
B False

Answers and explanations are in the Veda app.

Q22. JavaScript માં 'function declaration' ને hoisting થાય છે.

Advanced
A True
B False

Answers and explanations are in the Veda app.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Paper Solver

Get Veda free See what students get

Free to start · Android app and web · More than 40 languages