Skip to content

Instantly share code, notes, and snippets.

Paul Etscheit petscheit

Block or report user

Report or block petscheit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View haha
post_test = Post.new
parser_test = Parser.new
parser_test.open_file('html-samples/hacker-news-post.html')
parser_test.comment_args.each do |comment_hash|
post_test.add_comment(Comment.new(comment_hash))
end
post_test.comments
View 9.js
var object = {
method : function() { code block},
}
View 8.js
for (property in objectName) {
code block
}
View 7.js
objectName.property
objectName["String Key"]
objectName[expression_or_variable]
View 6.js
delete objectName.property
View 5.js
objectName.newProperty = value
View 4.js
anotherCar = Object.create( car );
anotherCar.manufacturer = "McLaren";
anotherCar.model = "P1";
console.log( anotherCar ); // Object {manufacturer: "McLaren", model: "P1"}
console.log( car ); // Object {manufacturer: "Bugatti", model: "Veyron"}
View 3.js
anotherCar = car;
anotherCar.manufacturer = "McLaren";
anotherCar.model = "P1";
console.log( anotherCar ); // Object {manufacturer: "McLaren", model: "P1"}
console.log( car ); // Object {manufacturer: "McLaren", model: "P1"}
View 2.js
car = {
manufacturer: "Bugatti",
model: "Veyron"
}
View 1.js
car = new Object();
car.manufacturer = "Bugatti";
car.model = "Veyron";
You can’t perform that action at this time.