You are on page 1of 2

Assignment No.

03
Semester:
SPRING 2018 CS101 –Introduction to
Computing

ID:mc180202899

Question No. 2 [Marks 10]

Write correct choice in front of each description. Answer:

Sr# Description Choice

1 A VPN is an example of Private Network

2 Uses Packets to transfer data from one network to MODEM


another network

3 Connects to Physical Medium Router

4 Topology which has a single point of failure Star Topology

5 The medium which provides highest bandwidth Optical Fiber

Question No. 1 [Marks 10]

You need to study the following JavaScript code carefully. Write the below code without if-else
to do the same job by using Switch Statement?

switch (true) {
    case (MousePosition == 'Div1'):
        alert("Div1");
        break;
    case (MousePosition == 'Div2'):
        alert("Div2");
        break;
    case (MousePosition == 'Div3'):
        alert("Div3");
        break;
    case (MousePosition == 'Div4'):
        alert("Div4");
        break;
    case (MousePosition == 'Div5'):
        alert("Div5");
        break;
    default:
        alert("none");
        break;

You might also like