Skip to content

Added few more type tests. #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed the for-in loop
  • Loading branch information
Hemanth HM authored and Hemanth HM committed Mar 1, 2013
commit 005f82300c4b97483951901082c53b0524a3ea2c
12 changes: 6 additions & 6 deletions page/javascript-101/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var myObject = {
};
```

## Iterating over the enumerable properties of an object
__Iterating over the enumerable properties of an object : __
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to use the hashmark style headers that are in use throughout the rest of our markdown content? Thanks


```
var myObject = {
Expand All @@ -43,14 +43,14 @@ var myObject = {
99999: 789
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above three lines should be indented with one tab instead of two spaces.


for(var prop in myObject) {
console.log(key);
for ( var prop in myObject ) {
console.log("Property : "+prop+" ; value : "+myObject[prop]);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Should have tab instead of space indentation.
  • Spaces around the plus signs.
  • [prop] should be [ prop ]
  • Also, there should be space around the whole argument to console.log()

}

/* Would log :
99999
validIdentifier
some string
Property : 99999 ; value : 789
Property : validIdentifier ; value : 123
Property : some string ; value : 456
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line comment syntax is not used in many (any?) other places, so I think this should be turned into multiple single-line comments. But that's just my opinion :)

```