Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

Understanding the Digital Revolution Lab - Software

Overview - In this lab, you will write some code in the JavaScript programming language, and explore the free and open-source software community.

Task Details -

Task One - JavaScript

JavaScript is a high-level interpreted programming language. It is built in to every popular web browser, including Chrome, Firefox, Internet Explorer, Edge, and Safari.

This lab assumes you are using Chrome, however most of the functions we'll use have equivalents in other browsers.

To get started, open Chrome and navigate to about:blank Instead of an http or https site. There are a few interesting about: pages which are built in to your browser. Try visiting about:credits

From this (blank) page, press either Ctrl-Shift-J (that is, hold Ctrl and Shift and press J) or F12 to open the Developer Tools for brevity, we'll refer to the Developer Tools as DevTools.

Task 1.a - Using JavaScript as a calculator

See the > character in the Console tab? That is a prompt, a place where you can type JavaScript for it to be executed immediately.

Task 1.b - Talking to the browser

JavaScript by itself can't do much of interest besides cool maths. JavaScript gets much more interesting when you use it to manipulate the web browser itself.

Try typing each of the following lines of code, and again, note the response:

  • alert("Hello")
  • prompt("How great is this lab?")
  • document.write("

    Look over here

    ")

Each of these gave you some way of modifying the page or interacting with the user.

Task 1.c - Variables

When we were exploring machine instructions, we looked at registers and RAM as ways to (temporarily) store values while we were working on them

For instance, in the linear search we stored an memory address at cell 72

JavaScript (and most other programming languages) make this easier for you, by letting you create variables. A variable is analogous to a register or location in RAM, but you don't have to worry about where it is stored in RAM.

Try the following lines of code, in order, to get a sense of what variables are:

  • var age = prompt("How old are you?")
  • var message = "Your age is " + age;
  • alert(message)

Note how we ask the user (you, in this case) for some information, store it in a variable and do something with it. However, we don't need to know or make up an address in RAM in which to store the age.

Task Two - JavaScript using jsFiddle

In Task 1.c you wrote a series of lines of code that combine to make some interesting behaviour. In this exercise, you will write multiple lines of JavaScript to change a web page.

Task 2.a - jsFiddle

Close the DevTools, and in your web browser - jsFiddle is a web site that lets you explore and play with HTML, CSS and JavaScript without needing to run your own web server.

Task 2.b - Functions and Event listeners (Optional, advanced)

Add a

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M92777623
  • Price:- $60

Guranteed 36 Hours Delivery, In Price:- $60

Have any Question?


Related Questions in Homework Help/Study Tips

Questions -q1 which 1903 case was the most important

Questions - Q1) Which 1903 case was the most important incident to advance the use of fingerprints in the United States? A) Lindberg B) Fauld C) West D) Vucetich Q2) In 1985, research by ______ and his colleagues at Leic ...

Question the annotated bibliography is an important step in

Question: The annotated bibliography is an important step in the research process. It requires you to think about if a source works well for your project and how you might use it. It is a pretty straightforward assignmen ...

Question describe why apa format citations are important

Question: Describe why APA format citations are important when writing any report with outside sources. Be sure to mention the consequences that may occur if caught plagiarizing. Respond to 2 of your peers posts. 33 word ...

Assignment specificationquestion 1hint we cover this in

Assignment Specification Question 1 HINT: We cover this in Lecture 1 (Summary Statistics and Graphs) Data were collected on the prices of parts at each shelf in auto parts showroom in Melbourne. The prices of parts at ea ...

How can a childs self-esteem be reinforced by counselors or

How can a child's self-esteem be reinforced by counselors or caretakers and What methods or techniques would you recommend?

Question - given the demand equation p 18 - 2q and supply

Question - Given the demand equation p = 18 - 2Q and supply equation by p= 2+2Q. a. Find out the equilibrium price and quantity. b. Find out consumer and producer surplus. c. Show it with a diagram.

Assignmentyou have just been part of a merger you have each

Assignment You have just been part of a merger. You have each been chosen to head up your department and merge the two groups into a self-directed work team. Work with each other to lay out a plan describing how you will ...

Question it is well known in the us that disadvantaged

Question: It is well known in the US that disadvantaged children do not get the same education. But, in other countries such as parts of China, Singapore, and Japan have less of a gap in educational success no matter the ...

Question the theory of comparative advantage may be applied

Question: The theory of comparative advantage may be applied to a country's output. Although natural resources within a country may often provide the best opportunity for comparative advantage, certain countries are able ...

Ethical scenarios worksheetchoose three of the seven

Ethical Scenarios Worksheet Choose three of the seven ethical case scenarios. Answer the following questions for each scenario in 75 to 100 words each. 1. What is the ethical issue described in the scenario? Why is this ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As