MCQ Bank
To sort an array in descending order, sort() function can be used with the combination of __________ function.
- A) Concat()
- B) Reverse()
- C) Slice()
- D) Shift()
Which of the following function is used to remove last element of the array?
- A) Delete()
- B) Shift()
- C) Pop()
- D) Push()
Choose the correct syntax to create an array students in JavaScript?
- A) var students = {"Ali", "Ahmed", "Noor"};
- B) var students[] = {"Ali", "Ahmed", "Noor"};
- C) var students ["Ali", "Ahmed", "Noor"];
- D) var students = ["Ali", "Ahmed", "Noor"];
Which of the following is NOT a way to join multiple words into one variable name in JavaScript?
- A) Camel Case
- B) Underscore
- C) Semicolon
- D) Hyphens
Which of the following value will JavaScript return if we calculate a number outside the largest possible number?
- A) Invalid
- B) Infinity
- C) Exceeded
- D) Outofrange
____________ is a lightweight data-interchange format.
- A) HTML
- B) JSON
- C) Java
- D) CSS
What does JSON stand for?
- A) Java Standard Object Notation
- B) JavaScript Object Notation
- C) JavaScript Online Notation
- D) JavaScript Object Network
How can JSON data be converted into native JavaScript objects?
- A) Using the JSON.stringify() function
- B) Using the XMLHttpRequest function
- C) Using the XMLParser function
- D) Using the JSON.parse() function
Why are XML Schemas considered more powerful than DTD?
- A) They support data types and namespaces
- B) They are less complex than DTDs
- C) They use CSS for styling
- D) They support JavaScript
Which of the following is not a benefit of using XML Schemas?
- A) It is easier to describe document content.
- B) It is easier to define restrictions on data
- C) It is only used for styling purposes
- D) It is easier to convert data between different data types.
What is an XML Schema?
- A) An XML-based alternative to DTD (Document Type Defination)
- B) A structure for representing the data in a database
- C) A language used to style XML documents
- D) A method for transferring data over the internet
Which of the following is not a naming rule for XML elements?
- A) It cannot start with the letters xml or XML or Xml, etc.
- B) It can contain letters, digits, hyphens, underscores, and periods.
- C) It must start with a letter or underscore.
- D) It can contain spaces.
Which statement is true about both JSON and XML?
- A) Both JSON and XML cannot be parsed by programming languages
- B) Both JSON and XML use end tags
- C) Both JSON and XML are not hierarchical
- D) Both JSON and XML can be fetched with an XMLHttpRequest
In an XML document, all elements can contain ________________.
- A) All of the given options
- B) sub elements
- C) attributes
- D) text
JSON makes it possible to store ________ objects as text.
- A) C++
- B) C
- C) JavaScript
- D) Java
JSON uses syntax of _________.
- A) HTML
- B) JavaScript
- C) Java
- D) CSS
Jurisdiction over cases arising in or involving persons residing within a defined territory refers to _______________.
- A) Cyber attack
- B) Extra Territorial Jurisdiction
- C) Cyber Jurisdiction
- D) Territorial Jurisdiction
In cyber world URL’s are more like
- A) E-mail Address
- B) IP Address
- C) None of the Above
- D) Trademark
_______ provides the rights of the owner of a name, symbol, and mark for protection to avoid consumer confusion.
- A) Patent
- B) License
- C) Trademark
- D) Copyrights
The offence of sending illegal electronic messages to any person without the permission of the recipient is called ____________.
- A) Spoofing
- B) Data damage
- C) Stalking
- D) Spamming