GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — various fixes from github issues · jokoss92/fullstack-javascript@bb984e7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • chapter2
    • chapter2.md
  • chapter3
    • chapter3.md
  • chapter4
    • chapter4.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎chapter2/chapter2.md‎

Copy file name to clipboardExpand all lines: chapter2/chapter2.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Setup
99
>
1010
> —[Ken Thompson](http://en.wikipedia.org/wiki/Ken_Thompson)
1111
12-
In this chapter, we1 cover the following topics:
12+
In this chapter, we'll cover the following topics:
1313

1414
- Suggestions for the toolset
1515

Collapse file

‎chapter3/chapter3.md‎

Copy file name to clipboardExpand all lines: chapter3/chapter3.md
+4-10Lines changed: 4 additions & 10 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ JavaScript Object Notation
5757
--------------------------
5858

5959
Here is the definition of JavaScript Object Notation (JSON) from
60-
www.[json.org](http://www.json.org/)
60+
<http://www.json.org>.
6161

6262
> JavaScript Object Notation, or JSON, is a lightweight data-interchange
6363
> format. It is easy for humans to read and write. It is easy for
@@ -110,18 +110,13 @@ another object; for example:
110110
"comments": []
111111
}
112112
],
113-
"totalPost": 2,
114-
"getData": function () {
115-
return new Data().getDate();
116-
}
113+
"totalPosts": 2
117114
}
118115

119116
In this example, we have an object with the `posts` property. The
120117
value of the `posts` property is an array of objects with each one of
121118
them having `title`, `votes`, and `comments` keys. The `votes` property
122-
holds a number primitive, whereas `comments` is an array of strings. We
123-
also can have functions as values; in this case, the key is called a
124-
method; that is, `getData`.
119+
holds a number primitive, whereas `comments` is an array of strings. We cannot have function as fields. JSON is strictly a data structure. (We can have function in JS objects though.)
125120

126121
JSON is much more flexible and compact than XML or other data formats,
127122
as outlined in this article: [JSON: The Fat-Free Alternative to
@@ -753,8 +748,7 @@ once a user clicks the buttons. The aforementioned buttons call the
753748
}
754749

755750
The code should be straightforward. We get the value of the city name
756-
from the input box, check that it's not empty, and call `getDada()`,
757-
which will make the XHR request to the server. You've already seen an
751+
from the input box (ID `city-name`). Then, we check that the city name is NOT empty, and call `getDada()`. This function `getData()` will make the XHR request to the server (Open Weather API). You've already seen an
758752
example of the `$.ajax` request. Please note that the callback
759753
function is named `fetchData`. This function will be called after
760754
the browser gets the response from the OpenWeatherMap API. Needless to
Collapse file

‎chapter4/chapter4.md‎

Copy file name to clipboardExpand all lines: chapter4/chapter4.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ like this:
106106
</body>
107107
</html>
108108

109-
We can also put `<script>` tags right after the `</body>` tag at the end
109+
We can also put `<script>` tags right before the `</body>` tag at the end
110110
of the file. This will change the order in which scripts and the rest of
111111
the HTML is loaded, and affect performance in large files.
112112

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.