Giter VIP home page Giter VIP logo

mapmaker-mapmaker's Introduction

Mapmaker Mapmaker

Introduction

Mapping - it's string-building for arrays!

Kind of like "Tinder for ____", but... less Silicon Valley.

Workflow

This is your typical test-run assignment. jest --watch-all is your friend!

Guidelines

  • Now that we're not dealing with strings as our main focus--we'll be using strings, but focusing overall on the arrays that hold them--, let's open things up to using string methods. You should find .slice and .indexOf (the string version, not the array version) particularly useful. A little research is your friend on this!
  • Also useful: Math.abs, which takes in a number and gives you back its absolute value. Check it out!
  • But do not use ANY array methods. Particularly .map-- that' the one we're doing manually here, after all!

Tasks

  • doubleAll - returns all numbers but doubled from the given array
    • doubleAll([1, 2, 3, 4]) -> [2, 4, 6, 8]
    • doubleAll([-5, 101, 0, 32.5]) -> [-10, 202, 0, 65]
  • yelledGreetings - returns the same strings but with exclamation points appended from the given array
    • yelledGreetings(['hello', 'there', 'you absolute fiend']) -> ['hello!', 'there!', 'you absolute fiend!']
    • yelledGreetings(['hey', 'you']) -> ['hey!', 'you!']
  • absoluteValues - returns the absolute values of all numbers in the given array
    • absoluteValues([-1, -3, 1000]) -> [1, 3, 1000]
    • absoluteValues([1, -5, 100]) -> [1, 5, 100]
  • upperCaseFirstLetters - returns a version of each string in the given array where the first letter has been capitalized
    • upperCaseFirstLetters(['colin', 'mesuara', 'genghis', 'pak', 'ginny', 'michael', 'tenzin']) -> ['Colin', 'Mesuara', 'Genghis', 'Pak', 'Ginny', 'Michael', 'Tenzin']
    • upperCaseFirstLetters(['cOlin', 'geNghis', 'mesUara', 'ginny', 'michael', 'pak', 'tenzin']) -> ['Colin', 'Genghis', 'Mesuara', 'Ginny', 'Michael', 'Pak', 'Tenzin']
  • changeToInitials - returns the first letters from each word in the given array
    • changeToInitials(['Colin Jaffe', 'Mesuara Kaleziq']) -> ['CJ', 'MK']
    • changeToInitials(['Larry Bird', 'Robert Parrish']) -> ['LB', 'RP']
  • doubleOdd - returns the numbers from the given array untouched, except for odd numbers (positive or negative), which it doubles
    • doubleOdd([1, 2, 3, 4, 101, 0, 32.5]) -> [2, 2, 6, 4, 202, 0, 32.5]
    • doubleOdd([-5, -1, -100, -2]) -> [-10, -2, -100, -2]
  • add1ToLeft - returns the numbers from the given array but with 1 added to the left side of each
    • add1ToLeft([1, 2, 30, 400]) -> [11, 12, 130, 1400]
    • add1ToLeft([-1, -50]) -> [-11, -150]

mapmaker-mapmaker's People

Contributors

abbreviatedman avatar prem-0009 avatar

Stargazers

 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.