JavaScript Multiple Choice Questions and Answers – Lexical Structure | Javascript Online Quiz & MCQ

Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Questions
1 The web development environment (JavaScript) offers which standard construct for data validation of the input entered by the user.
A Controlled loop constructs
B Server page access
C Client side Event
D Permit server-side

Answer: Controlled loop constructs
2 The main purpose of a “Live Wire” in NetScape is to ________
A Create linkage between client side and server side
B Permit server side, JavaScript code, to connect to RDBMS
C Support only non relational database
D To interpret JavaScript code

Answer: Permit server side, JavaScript code, to connect to RDBMS
Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
3 The script tag must be placed in __________
A the head tag
B the head or body
C the title or head
D after the body tag

Answer: the head or body
4 A JavaScript program developed on a Unix Machine ________
A will throw errors and exceptions
B must be restricted to a Unix Machine only
C will work perfectly well on a Windows Machine
D will be displayed as a JavaScript text on the browser

Answer: will work perfectly well on a Windows Machine
5 JavaScript is ideal to ________
A make computations in HTML simpler
B minimize storage requirements on the web server
C increase the download time for the client
D increase the loading time of the website

Answer: minimize storage requirements on the web server
6 Which attribute is used to specify that the script is executed when the page has finished parsing? (only for external scripts)
A parse
B a sync
C defer
D type

Answer: defer
7 JavaScript Code can be called by using ____________
A RMI
B Triggering Event
C Preprocessor
D Function/Method

Answer: Function/Method
8 JavaScript can be written __________
A directly into JS file and included into HTML
B directly on the server page
C directly into HTML pages
D directly into the css file

Answer: directly into JS file and included into HTML
9 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: src
10 A proper scripting language is a __________
A High level programming language
B Assembly level programming language
C Machine level programming language
D Low level programming language

Answer: High level programming language
11 What will be the output of the following JavaScript code?

MCQ on Javascript

A good day
B goodday
B error
B undefined

Answer: goodday
12 What will be the output of the following JavaScript code?

MCQ on Javascript

A 0
B 1
C 2
D 5

Answer: 1
13 What will be the output of the following JavaScript code?

MCQ on Javascript

A 5
B 10
C 50
D Error

Answer: 50
14 What will be the output of the following JavaScript code?

MCQ on Javascript

A onetwo
B one two
C error
D undefined

Answer: onetwo
15 What will be the output of the following JavaScript code?

MCQ on Javascript

A integer
B number
C string
D error

Answer: string

Random GK Questions

Assam Direct Recruitment Test Series

Teacher Eligibility Test

Assam Direct Recruitment Test Series