8 kyu

Add Length

18,998 of 37,878debri

Description:

What if we need the length of the words separated by a space to be added at the end of that same word and have it returned as an array?

Example(Input --> Output)

"apple ban" --> ["apple 5", "ban 3"]
"you will win" -->["you 3", "will 4", "win 3"]

Your task is to write a function that takes a String and returns an Array/list with the length of each word added to each element .

Note: String will have at least one element; words will always be separated by a space.

Arrays
Lists
Fundamentals

More By Author:

Check out these other kata created by debri

Stats:

CreatedJul 8, 2015
PublishedJul 8, 2015
Warriors Trained49503
Total Skips1692
Total Code Submissions76420
Total Times Completed37878
JavaScript Completions18998
Python Completions14429
Ruby Completions1634
CoffeeScript Completions65
Elixir Completions405
C# Completions1742
Rust Completions696
D Completions16
TypeScript Completions614
Scala Completions39
Java Completions320
Total Stars347
% of votes with a positive feedback rating94% of 3388
Total "Very Satisfied" Votes3028
Total "Somewhat Satisfied" Votes326
Total "Not Satisfied" Votes34
Ad
Contributors
  • debri Avatar
  • jhoffner Avatar
  • SagePtr Avatar
  • jackdalton Avatar
  • cris Avatar
  • asmgf Avatar
  • GiacomoSorbi Avatar
  • aweleshetu Avatar
  • kazk Avatar
  • Madjosz Avatar
  • Souzooka Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • KayleighWasTaken Avatar
  • gonzalo.mk Avatar
  • raul.ra Avatar
Ad