Question: Can you answer the multiple choice below? 1) The term port can be used in different ways depending on the context. When discussing transport protocols

Can you answer the multiple choice below?

1) The term "port" can be used in different ways depending on the context. When discussing transport protocols, ports are _.

virtual

physical

2) Let's say a designer gave you, a web developer, the task of implementing light/dark mode on a website. One requirement the designer gave you is that when a user opens the site on a different device, their choice of light or dark mode should persist. For example, if a user logs into the website and selects dark mode, and then logs into the site on mobile, the site on mobile should still be in dark mode. Where is the appropriate location to store the user's choice?

Server

Cookies

data- attribute on an HTML element

SessionStorage

LocalStorage

 
  • Socks
  • T-Shirt
  • Shorts

3) Given you've selected the list element with text Socks and saved it to a variable sock, how would you access the data-count attribute?

sock.dataset.count

sock.data-count

sock.count

sock.data.count

        

4) After a person clicks the "Click me" button in their browser two times, what do they see? (code above)

A button that reads "Click me!!"

A button that reads "Click me"

A button that reads "!"

A button that reads "Click me!"

A button that reads "!!"

      

5) How can you fix the above code to show "Hello, Programmers!"?

What do you mean? Everything's fine with it.

Add another "div" to the body.

Change the id from "message" to "Message'.

Wrap the JavaScript in a DOMContentLoaded event handler.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!