Skip to main content

Basic And Variables — Part 2 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Basic And Variables — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
39
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
47 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
39

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/39 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 39
★ FPSC ★ PPSC

Among the keywords below, which one is not a statement?

Question 2 of 39
★ FPSC ★ PPSC

The unordered collection of properties, each of which has a name and a value is called

Question 3 of 39
★ FPSC ★ PPSC

The object has three object attributes namely

Question 4 of 39
★ FPSC ★ PPSC

Consider the following code snippet : var book = { " main title ": " JavaScript " , ' sub-title ': " The Definitive Guide " , " for ": " all audiences " , author : { firstname : " David " , surname : " Flanagan " } } ; In the above snippet, firstname and surname are

Question 5 of 39
★ FPSC ★ PPSC

A linkage of series of prototype objects is called as :

Question 6 of 39
★ FPSC ★ PPSC

Consider the below given syntax book [ datatype ] = assignment_value; In the above syntax, the datatype within the square brackets must be

Question 7 of 39
★ FPSC ★ PPSC

To determine whether one object is the prototype of (or is part of the prototype chain of) another object, one should use the

Question 8 of 39
★ FPSC ★ PPSC

Consider the following code snippet function f () {} ; The above prototype represents a

Question 9 of 39
★ FPSC ★ PPSC

The purpose of extensible attribute is to

Question 10 of 39
★ FPSC ★ PPSC

Identify the process done in the below code snippet o = { x : 1 , y :{ z :[false,null, "" ]}} ; s = JSON . stringify ( o ) ; p = JSON . parse ( s ) ;

Question 11 of 39
★ FPSC ★ PPSC

A JavaScript program developed on a Unix Machine

Question 12 of 39
★ FPSC ★ PPSC

JavaScript Code can be called by using

Question 13 of 39
★ FPSC ★ PPSC

A proper scripting language is a

Question 14 of 39
★ FPSC ★ PPSC

Consider the following snippet code var string1 = ” 123 ”; var intvalue = 123 ; alert ( string1 + intvalue ) ; The result would be

Question 15 of 39
★ FPSC ★ PPSC

Consider the following statements var count = 0 ; while ( count < 10 ) { console . log ( count ) ; count ++ ; } In the above code snippet, what happens?

Question 16 of 39
★ FPSC ★ PPSC

The enumeration order becomes implementation dependent and non-interoperable if :

Question 17 of 39
★ FPSC ★ PPSC

The basic purpose of the toLocaleString() is to

Question 18 of 39
★ FPSC ★ PPSC

Javascript is _________ language.

Question 19 of 39
★ FPSC ★ PPSC

JavaScript is ______ Side Scripting Language.

Question 20 of 39
★ FPSC ★ PPSC

JavaScript is designed for following purpose

Question 21 of 39
★ FPSC ★ PPSC

JavaScript Code is written inside file having extension __________.

Question 22 of 39
★ FPSC ★ PPSC

Local Browser used for validations on the Web Pages uses __________.

Question 23 of 39
★ FPSC ★ PPSC

We can embed JS code inside HTML directly ?

Question 24 of 39
★ FPSC ★ PPSC

JS code included inside head section is loaded before loading page.

Question 25 of 39
★ FPSC ★ PPSC

It is good to include JS code inside footer section in order to speed up the Page loading time of Webpage.

Question 26 of 39
★ FPSC ★ PPSC

Which attribute is used to specifies that the script is executed when the page has finished parsing (only for external scripts)

Question 27 of 39
★ FPSC ★ PPSC

Which was the first browser to support JavaScript ?

Question 28 of 39
★ FPSC ★ PPSC

JavaScript is invented by ________.

Question 29 of 39
★ FPSC ★ PPSC

JavaScript was invented at _______ Lab.

Question 30 of 39
★ FPSC ★ PPSC

Variable can hold ________ value at a time.

Question 31 of 39
★ FPSC ★ PPSC

Integer Variable is declared using following syntax in JavaScript.

Question 32 of 39
★ FPSC ★ PPSC

We can declare ___________ at a time. Select most appropriate option.

Question 33 of 39
★ FPSC ★ PPSC

Spaces,Punctuation marks are called as __________ Symbols in JavaScript.

Question 34 of 39
★ FPSC ★ PPSC

Java Script Variable should be Case ___________.

Question 35 of 39
★ FPSC ★ PPSC

Initialization of variable can be done by writing _____ operator in between variable name and operand value.

Question 36 of 39
★ FPSC ★ PPSC

Multiple Declarations of variables are separated by ___________ symbol.

Question 37 of 39
★ FPSC ★ PPSC

Underscore can be used as first letter while declaring variable in JavaScript.

Question 38 of 39
★ FPSC ★ PPSC

Variable declared inside JavaScript Function will be called as ____________.

Question 39 of 39
★ FPSC ★ PPSC

Local Variables are destroyed after execution of function.

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →