Title: Default for CS 2215/INF 2215
Course: Web Technology 2020

Q: Consider the following JavaScript statement containing regular expressions and check if the pattern matches?

var text = "testing: 1, 2, 3";
var pattern = /\d+/g;
- text==pattern
- text.equals(pattern)
- text.test(pattern)
- pattern.test(text) (Correct!)
A: pattern.test(text)

Q: What will be the output of the following JavaScript code?

System.out.println(Pattern.matches("[amn]", "abcd"));
- true
- false
- a
- undefined
A: false

Q: What is the output of the following:

var status = ‘I am working VERY hard’;

status.search(/very/);
- 13
- true
- -1
- false
A: -1

Q: What is the output of the following:

/very/i.test('I am working VERY hard');
- 13
- true
- false
- -1
A: true

Q: What is the output of the following:

var numbers = ‘5 8 4 5 7 6’;  //Note there are spaces between numbers

numbers.search(/[014]/);
- true
- 4
- false
- 2
A: 4

Q: What is the output of the following?

var password = ‘BITAM2020’;

 password.search(/\d/);
- 5
- true
- false
- 6
A: 5

Q: What will be the output of the following JavaScript code?

console.log(Pattern.matches("[^abc]", "aemngq"));
- true
- false
- 1
- undefined
A: false

Q: CSS stands for __________
- Color Style Sheets (Wrong!)
- Cascade Sheets Style (Wrong!)
- Cascade Style Sheet (Wrong Wrong!)
- Cascading Style Sheet (Well done!)
A: Cascading Style Sheet

Q: In CSS, h1 can be called as _______
- Selector (Keep Going!)
- Attribute
- Value
- Tag
A: Selector

Q: In css, “color:red” can be called as _____________
- Selector
- Rule
- Declaration (Correct!)
- Value
A: Declaration

Q: Which of the following attributes is used to specify elements to bind style rules to?
- class
- id
- tag
- all of the above (Nice!)
A: all of the above

Q: Which selector is used to specify a rule to bind a particular unique element?
- id (Well done!)
- class
- tag
- both class and tag
A: id

Q: In CSS, “font-size” can be called as ________
- Selector
- Rule
- Property
- Property_name (Good!)
A: Property_name

Q: _________ selectors are used to specify a group of elements.
- id
- class (Correct!)
- tag
- both class and tag
A: class

Q: Which of the following tags is used to embed css in a html page?
- <script>
- <style> (Good!)
- <css>
- <!DOCTYPE html> !DOCTYPE html> !DOCTYPE html> !DOCTYPE html> !DOCTYPE html>
A: <style>

Q: __________ has introduced text, list, box, margin, border, color, and background properties.
- css (Great!)
- html
- ajax
- php
A: css

Q: Which of the following is correct about CSS?
- CSS is the acronym for "Cascading Style Sheet".
- CSS is used to control the style of a web document in a simple and easy way.
- You can write CSS once and then reuse same sheet in multiple HTML page.
- All of the above (Good job!)
A: All of the above