Giter Site home page Giter Site logo

each's Introduction

each

Overview

This repository was created as a resource for the BE Mod1 Lesson on each. It can be used in conjunction with the Exploring #each slide deck.

Setup

You do not need to fork this repository unless you want a copy in your own Github account. For the purposes of the lesson, you can:

  • Clone this repo

Making it run

This repository has four folders. For the purposes of the lesson, the folder order is as follows:

  • vocabulary
  • warm_up
  • exercises
  • practice

In exercises folder you will see the following files. For the purposes of the lesson, the file order is as follows:

  • warm_up.rb

  • using_each.rb

  • transforming_elements.rb

  • subset.rb

  • create_new.rb

  • In each of the files you will have a collection that you will write code for, implementing the .each method.

  • Below the collection you will see commented out instructions on what you are trying to implement and the questions you will work to answer.

  • These files will not implement tests so you will need to use a p or puts before the variable you want to output to your terminal.

    Example:

    names = ["bob", "linda", "joe", "sally"]
    p names
    
    or
    
    names = ["bob", "linda", "joe", "sally"]
    
    names.each do |name|
      puts name
    end
  • In your terminal make sure that you cd into the directory that you created and put your cloned repository into. Then cd each.

  • In your terminal you will follow this format to run the file and have it print:

ruby exercises/<name of file you want to run>

Additional Resources

each's People

Contributors

dcoleman21 avatar

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.