Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added meta charset and corrected an error in the JS Section #28

Closed
wants to merge 1 commit into from

2 participants

@exside

Added meta charset and corrected an error in the JS Section (I think it's one =D)

@taitems
Owner

The second part is intended, so I cannot merge your pull request. Added charset locally, pending commit.

@taitems taitems closed this
@exside

OK, but then I'm not getting it, why does this work? (The Object accessing when you want to get user.name and the object is named greet, seems not logical to me, so in my opinion it would be accessed with greet.user...but I'm just learning js, so I would be thankful if you could explain this strange thing to me =D)

Another user did bigtime work to make the code valid: ryansully@37c71a9

@taitems
Owner

"greet" is a function, not an object. An object is being constructed inline {}, and then passed to the function where it is available as the parameter "user".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 10, 2011
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.html
View
4 index.html
@@ -3,7 +3,7 @@
<html>
<head>
-
+ <meta charset="utf-8" />
<title>Front End Development Guidelines</title>
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<link href="includes/styles.css" rel="stylesheet" type="text/css" />
@@ -591,7 +591,7 @@ <h1 id="javascriptSection">JavaScript</h1>
alert(user.name);
}
- greet({
+ user({
name: "Bob",
gender: "male"
});
Something went wrong with that request. Please try again.