Web Dev Notes

Blog about web development by Robert Dawson

Make a baby with JavaScript!

This JavaScript code makes a baby that eats and poops right in your browser's console!

// make a baby constructor
var Baby = function(name){
    this.name = name;
}
// let the baby eat
Baby.prototype.eat = function(){
    console.log("Nom, nom, nom...");
};
// let the baby poop
Baby.prototype.poop = function(){
    console.log("Wah, wah, wah...");
};
// make a baby
var myBaby = new Baby();
// name the baby
myBaby.name = "Kal-El";
// say the baby's name
console.log(myBaby.name);
// feed the baby
myBaby.eat();
// watch the baby poop
myBaby.poop();

// TODO: Write birdsAndBees()
// TODO: Write payForCollege()
// TODO: Write getAJob()

The Pad in 2022?

Is it silly to suppose that a future iPad might simply be called Pad? Think about it. If a company can redefine a common verb like "like," isn't it possible to redefine a proper and much less commonly used noun?

Blackmine

I want to make a task manager for philosophy students, particularly followers of Existentialism, called Blackmine, in which you are given a predefined and unchangeable set of possible steps or actions, none of which resolve anything and all of which lead back to the beginning.