SlideShare a Scribd company logo
IMPORTANT MCQs
FOR ONLINE EXAM
JAVASCRIPT
1) In a Javascript Application what function can be used to send
messages to users requesting for an text input?
a. Display()
b. Alert()
c. GetOutput()
d. Prompt()
ANSWER: Prompt()
Explanation:
This function is used when we want to input text in javascript.
2) - Which of the following function of String object returns a string
representing the specified object?
A - toLocaleUpperCase()
B - toUpperCase()
C - toString()
D - substring()
Answer : C
Explanation
toString() − Returns a string representing the specified object.
3) - Which built-in method returns the characters in a string beginning at the
specified location?
A - substr()
B - getSubstring()
C - slice()
D - None of the above.
Answer : A
Explanation
substr() method returns the characters in a string beginning at the specified
location through the specified number of characters.
4) - Which of the following function of String object returns the characters
in a string between two indexes into the string?
A - slice()
B - split()
C - substr()
D - substring()
Answer : D
Explanation
substring() − Returns the characters in a string between two indexes into the
string.
5)The script tag must be placed in
A.head
B.head and body
C.title and head
D.all of the mentioned
Answer: Option B
Solution:If the script tag is placed after the body tag, then, it will not be
evaluated at all.
Also, it is always recommended and effective to use the script snippet in the
<head> tag.
6)Which of the following attribute is used to include External JS code inside
your HTML document
A.src
B.ext
C.script
D.link
Answer: Option A
Solution:
A ”src” attribute could be used to add any external code into the HTML
document.
7)The setTimeout() belongs to which object?
A.Element
B.Window
C.Location
D.None of the mentioned
Answer: Option B
Solution:
The setTimeout() method of the Window object
schedules a function to run after a specified number of milliseconds elapses.
8. To which object does the location property belong?
A.Window
B.Position
C.Element
D.Location
Answer: Option A
Solution:
The location property of the Window object refers to a Location object,
which represents the current URL of the document displayed in the window,
and which also defines methods for making the window load a new
document.
9) The keyword or the property that you use to refer to an object through
which they were invoked is
A.from
B.to
C.this
D.Object
Answer: Option C
Solution:
The ‘this’ keyword is used to refer to the object through which the properties or
methods were invoked. This use of ‘this’ is a fundamental characteristic of the
methods of any class
10)The four kinds of class members are
A.Instance methods, Instance fields, Static method, Dynamic method
B.Instance fields, Instance methods, Class fields, Class methods
C.Instance fields, Non-instance fields, Dynamic methods, Global methods
D.Global methods, Local methods, Dynamic methods, Static methods
Answer: Option B
Solution:
The four kinds of class members are Instance fields, Instance methods, Class fields,
Class methods.
Like share and
subscribe
KEEP WATCHING…

More Related Content

What's hot

Java%20 new%20faq.doc 0
Java%20 new%20faq.doc 0Java%20 new%20faq.doc 0
Java%20 new%20faq.doc 0aravind_aashu
 
Html, xml and java script
Html, xml and java scriptHtml, xml and java script
Html, xml and java scriptRajeev Uppala
 
Javascript built in String Functions
Javascript built in String FunctionsJavascript built in String Functions
Javascript built in String Functions
Avanitrambadiya
 
Groovy Api Tutorial
Groovy Api  TutorialGroovy Api  Tutorial
Groovy Api Tutorialguligala
 
Declarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemTDeclarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemT
diannepatricia
 
Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets
Tushar Joshi
 
JavaScript Workshop
JavaScript WorkshopJavaScript Workshop
JavaScript Workshop
Pamela Fox
 
Unitii classnotes
Unitii classnotesUnitii classnotes
Unitii classnotes
Sowri Rajan
 
Breaking down data silos with the open data protocol
Breaking down data silos with the open data protocolBreaking down data silos with the open data protocol
Breaking down data silos with the open data protocolWoodruff Solutions LLC
 
JavaScript - Chapter 10 - Strings and Arrays
 JavaScript - Chapter 10 - Strings and Arrays JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
WebStackAcademy
 
Regular expression unit2
Regular expression unit2Regular expression unit2
Regular expression unit2
smitha273566
 
DIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web DesigningDIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web Designing
Rasan Samarasinghe
 
R Programming: Variables & Data Types
R Programming: Variables & Data TypesR Programming: Variables & Data Types
R Programming: Variables & Data Types
Rsquared Academy
 

What's hot (14)

Java%20 new%20faq.doc 0
Java%20 new%20faq.doc 0Java%20 new%20faq.doc 0
Java%20 new%20faq.doc 0
 
Html, xml and java script
Html, xml and java scriptHtml, xml and java script
Html, xml and java script
 
Javascript built in String Functions
Javascript built in String FunctionsJavascript built in String Functions
Javascript built in String Functions
 
Groovy Api Tutorial
Groovy Api  TutorialGroovy Api  Tutorial
Groovy Api Tutorial
 
Declarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemTDeclarative Multilingual Information Extraction with SystemT
Declarative Multilingual Information Extraction with SystemT
 
3. CSS
3. CSS3. CSS
3. CSS
 
Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets
 
JavaScript Workshop
JavaScript WorkshopJavaScript Workshop
JavaScript Workshop
 
Unitii classnotes
Unitii classnotesUnitii classnotes
Unitii classnotes
 
Breaking down data silos with the open data protocol
Breaking down data silos with the open data protocolBreaking down data silos with the open data protocol
Breaking down data silos with the open data protocol
 
JavaScript - Chapter 10 - Strings and Arrays
 JavaScript - Chapter 10 - Strings and Arrays JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
 
Regular expression unit2
Regular expression unit2Regular expression unit2
Regular expression unit2
 
DIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web DesigningDIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web Designing
 
R Programming: Variables & Data Types
R Programming: Variables & Data TypesR Programming: Variables & Data Types
R Programming: Variables & Data Types
 

Similar to Javascript MCQ

Comp 328 final guide
Comp 328 final guideComp 328 final guide
Comp 328 final guide
krtioplal
 
Javascript Question
Javascript QuestionJavascript Question
Prueba de conociemientos Fullsctack NET v2.docx
Prueba de conociemientos  Fullsctack NET v2.docxPrueba de conociemientos  Fullsctack NET v2.docx
Prueba de conociemientos Fullsctack NET v2.docx
jairatuesta
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
Knowledge Center Computer
 
Java Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Multiple Choice Questions and Answers
Java Multiple Choice Questions and Answers
Java Projects
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
Knowledge Center Computer
 
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUROOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
lochan100
 
DIWE - Advanced PHP Concepts
DIWE - Advanced PHP ConceptsDIWE - Advanced PHP Concepts
DIWE - Advanced PHP Concepts
Rasan Samarasinghe
 
1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii
Isabella789
 
Maharashtra state board Hsc IT Chap 3.pdf
Maharashtra state board Hsc IT Chap 3.pdfMaharashtra state board Hsc IT Chap 3.pdf
Maharashtra state board Hsc IT Chap 3.pdf
AAFREEN SHAIKH
 
Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008Luis Enrique
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors성진 원
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
rosemarybdodson23141
 
Qtp certification questions
Qtp certification questionsQtp certification questions
Qtp certification questionsRamu Palanki
 
Qtp certification questions
Qtp certification questionsQtp certification questions
Qtp certification questionsRamu Palanki
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorialRamu Palanki
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorialRamu Palanki
 
Group111
Group111Group111
CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question Paper
Malathi Senthil
 
OOM MCQ 2018
OOM  MCQ 2018OOM  MCQ 2018
OOM MCQ 2018
lochan100
 

Similar to Javascript MCQ (20)

Comp 328 final guide
Comp 328 final guideComp 328 final guide
Comp 328 final guide
 
Javascript Question
Javascript QuestionJavascript Question
Javascript Question
 
Prueba de conociemientos Fullsctack NET v2.docx
Prueba de conociemientos  Fullsctack NET v2.docxPrueba de conociemientos  Fullsctack NET v2.docx
Prueba de conociemientos Fullsctack NET v2.docx
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
Java Multiple Choice Questions and Answers
Java Multiple Choice Questions and AnswersJava Multiple Choice Questions and Answers
Java Multiple Choice Questions and Answers
 
Part - 2 Cpp programming Solved MCQ
Part - 2  Cpp programming Solved MCQ Part - 2  Cpp programming Solved MCQ
Part - 2 Cpp programming Solved MCQ
 
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUROOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
OOM MCQ Dev by Prof PL Pradhan TGPCET, NAGPUR
 
DIWE - Advanced PHP Concepts
DIWE - Advanced PHP ConceptsDIWE - Advanced PHP Concepts
DIWE - Advanced PHP Concepts
 
1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii
 
Maharashtra state board Hsc IT Chap 3.pdf
Maharashtra state board Hsc IT Chap 3.pdfMaharashtra state board Hsc IT Chap 3.pdf
Maharashtra state board Hsc IT Chap 3.pdf
 
Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008
 
C# programming constructors
C# programming  constructorsC# programming  constructors
C# programming constructors
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
 
Qtp certification questions
Qtp certification questionsQtp certification questions
Qtp certification questions
 
Qtp certification questions
Qtp certification questionsQtp certification questions
Qtp certification questions
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorial
 
Qtp certification questions and tutorial
Qtp certification questions and tutorialQtp certification questions and tutorial
Qtp certification questions and tutorial
 
Group111
Group111Group111
Group111
 
CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question Paper
 
OOM MCQ 2018
OOM  MCQ 2018OOM  MCQ 2018
OOM MCQ 2018
 

More from Shaheen Shaikh

Internet of things (IOT)
Internet of things (IOT)Internet of things (IOT)
Internet of things (IOT)
Shaheen Shaikh
 
IOT MCQ part3- Internet of Things
IOT MCQ part3- Internet of ThingsIOT MCQ part3- Internet of Things
IOT MCQ part3- Internet of Things
Shaheen Shaikh
 
PHP Session - Mcq ppt
PHP Session - Mcq ppt PHP Session - Mcq ppt
PHP Session - Mcq ppt
Shaheen Shaikh
 
Mcq ppt Php- array
Mcq ppt Php- array Mcq ppt Php- array
Mcq ppt Php- array
Shaheen Shaikh
 
Xml ppt
Xml pptXml ppt
Introduction to web technologies
Introduction to web technologiesIntroduction to web technologies
Introduction to web technologies
Shaheen Shaikh
 
Fuzzy System and fuzzy logic -MCQ
Fuzzy System and fuzzy logic -MCQFuzzy System and fuzzy logic -MCQ
Fuzzy System and fuzzy logic -MCQ
Shaheen Shaikh
 
Mcq for Online Exam Soft Computing
Mcq for Online Exam Soft Computing Mcq for Online Exam Soft Computing
Mcq for Online Exam Soft Computing
Shaheen Shaikh
 
Genetic Algorithm
Genetic Algorithm Genetic Algorithm
Genetic Algorithm
Shaheen Shaikh
 

More from Shaheen Shaikh (9)

Internet of things (IOT)
Internet of things (IOT)Internet of things (IOT)
Internet of things (IOT)
 
IOT MCQ part3- Internet of Things
IOT MCQ part3- Internet of ThingsIOT MCQ part3- Internet of Things
IOT MCQ part3- Internet of Things
 
PHP Session - Mcq ppt
PHP Session - Mcq ppt PHP Session - Mcq ppt
PHP Session - Mcq ppt
 
Mcq ppt Php- array
Mcq ppt Php- array Mcq ppt Php- array
Mcq ppt Php- array
 
Xml ppt
Xml pptXml ppt
Xml ppt
 
Introduction to web technologies
Introduction to web technologiesIntroduction to web technologies
Introduction to web technologies
 
Fuzzy System and fuzzy logic -MCQ
Fuzzy System and fuzzy logic -MCQFuzzy System and fuzzy logic -MCQ
Fuzzy System and fuzzy logic -MCQ
 
Mcq for Online Exam Soft Computing
Mcq for Online Exam Soft Computing Mcq for Online Exam Soft Computing
Mcq for Online Exam Soft Computing
 
Genetic Algorithm
Genetic Algorithm Genetic Algorithm
Genetic Algorithm
 

Recently uploaded

ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 

Javascript MCQ

  • 1. IMPORTANT MCQs FOR ONLINE EXAM JAVASCRIPT
  • 2. 1) In a Javascript Application what function can be used to send messages to users requesting for an text input? a. Display() b. Alert() c. GetOutput() d. Prompt() ANSWER: Prompt() Explanation: This function is used when we want to input text in javascript. 2) - Which of the following function of String object returns a string representing the specified object? A - toLocaleUpperCase() B - toUpperCase() C - toString() D - substring() Answer : C Explanation toString() − Returns a string representing the specified object.
  • 3. 3) - Which built-in method returns the characters in a string beginning at the specified location? A - substr() B - getSubstring() C - slice() D - None of the above. Answer : A Explanation substr() method returns the characters in a string beginning at the specified location through the specified number of characters. 4) - Which of the following function of String object returns the characters in a string between two indexes into the string? A - slice() B - split() C - substr() D - substring() Answer : D Explanation substring() − Returns the characters in a string between two indexes into the string.
  • 4. 5)The script tag must be placed in A.head B.head and body C.title and head D.all of the mentioned Answer: Option B Solution:If the script tag is placed after the body tag, then, it will not be evaluated at all. Also, it is always recommended and effective to use the script snippet in the <head> tag. 6)Which of the following attribute is used to include External JS code inside your HTML document A.src B.ext C.script D.link Answer: Option A Solution: A ”src” attribute could be used to add any external code into the HTML document.
  • 5. 7)The setTimeout() belongs to which object? A.Element B.Window C.Location D.None of the mentioned Answer: Option B Solution: The setTimeout() method of the Window object schedules a function to run after a specified number of milliseconds elapses. 8. To which object does the location property belong? A.Window B.Position C.Element D.Location Answer: Option A Solution: The location property of the Window object refers to a Location object, which represents the current URL of the document displayed in the window, and which also defines methods for making the window load a new document.
  • 6. 9) The keyword or the property that you use to refer to an object through which they were invoked is A.from B.to C.this D.Object Answer: Option C Solution: The ‘this’ keyword is used to refer to the object through which the properties or methods were invoked. This use of ‘this’ is a fundamental characteristic of the methods of any class 10)The four kinds of class members are A.Instance methods, Instance fields, Static method, Dynamic method B.Instance fields, Instance methods, Class fields, Class methods C.Instance fields, Non-instance fields, Dynamic methods, Global methods D.Global methods, Local methods, Dynamic methods, Static methods Answer: Option B Solution: The four kinds of class members are Instance fields, Instance methods, Class fields, Class methods.