Coder Social home page Coder Social logo

fellowship's People

Contributors

jshawl avatar robertakarobin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fellowship's Issues

Starter and Solution code is confusing

The starter and solution JavaScript code is structured in a confusing way. Recommend to have a single interface method in the "fellowship" object and remove the parameters from the other methods:

var fellowship = {
โ€ฆ,
makeEverything: function() {
this.makeMiddleEarth();
this.makeHobbits();
this.keepItSecretKeepItSafe();
this.makeBuddies();
this.beautifulStranger();
this.forgeTheFellowShip();
}
}
// call a single method that does everything:
fellowship.makeEverything();

Chauncey Fellowship hw-

var fellowship = {
  hobbits: [
    "Frodo Baggins",
    "Samwise 'Sam' Gamgee",
    "Meriadoc \"Merry\" Brandybuck",
    "Peregrin 'Pippin' Took"
  ],
  buddies: [
    "Gandalf the Grey",
    "Legolas",
    "Gimli",
    "Strider",
    "Boromir"
  ],
  lands: [
    "The Shire", "Rivendell", "Mordor"
  ],
  makeMiddleEarth: function(lands) {
    for(var i = 0; i < fellowship.lands.length; i++) {
console.log(fellowship.lands[i]);
var land = document.createElement("article")
var middleearth = document.getElementById("middle-earth").
appendChild(land)
var h1 = document.createElement('h1')
land.appendChild(h1)
}
// create a section tag with an id of middle-earth
for(var i =0; i < fellowship.length; i ++);
var middleearth = document.createElement('section')
var land = document.createElement('article')
var middleearth = document.getElementById('middle-earth').appendChild(land)
var h1 = document.createElement('h1')land.appendChild(h1)
    // add each land as an article tag
    // inside each article tag include an h1 with the name of the land
    // append middle-earth to your document body

  makeHobbits: function(hobbits) {
      var hobbitslist = document.createElement('ul')
     // display an unordered list of hobbits in the shire
     // give each hobbit a class of hobbit
     for( i = 0; i > hobbits.length; i++);
     hobbit.textContent = hobbits[i];
     hobbit.className = 'hobbit';
  },

  keepItSecretKeepItSafe: function() {
    var ring = document.createElement('div').appendChild('ring');
    ring.id = 'the-ring'
    // add the ring as a child of Frodo
  },
  makeBuddies: function(buddies) {
    var asidetag = document.createElement('asidetag');
    // create an aside tag
    var buddies = document.createElement('ul');
    // display an unordered list of buddies in the aside

    // insert your aside before rivendell
  },
  beautifulStranger: function() {
    // change the buddy 'Strider' textnode to "Aragorn"
    var buddy = document.getElementsByTagName('aside')[0].getElementsByTagName('li');
    var striders = buddy[3];
    Strider.textContent = 'Aragorn'
  },
  forgeTheFellowShip: function() {
    var the-fellowship = document.createElement('div');
    the-fellowship.id = ('hobbits');
    // move the hobbits and the buddies to Rivendell
    // create a new div called 'the-fellowship'
    // add each hobbit and buddy one at a time to 'the-fellowship'
    // after each character is added make an alert that they have joined your party
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.