These are chat archives for camperbot/bonfire-spinal-tap-case

16th
Nov 2015
Eran
@EranZzZ
Nov 16 2015 15:31
Bonfire: Steamroller
CamperBot
@camperbot
Nov 16 2015 15:31

:fire:Bonfire: Steamroller :link:

function steamroller(arr) {
  // I'm a steamroller, baby
  return arr;
}

steamroller([1, [2], [3, [[4]]]]);

Flatten a nested array. You must account for varying levels of nesting.

more info:  bf details | bf links | hint

Eran
@EranZzZ
Nov 16 2015 15:31
hint
CamperBot
@camperbot
Nov 16 2015 15:31

hint [1/7]

## :construction: After this are possible spoiler hints.

Make sure you've tried to hard to solve it yourself before proceeding. :construction:

type hint for next hint :pencil: [Contribute at the FCC Wiki]

Eran
@EranZzZ
Nov 16 2015 15:31
hint
CamperBot
@camperbot
Nov 16 2015 15:31

hint [2/7]

# Problem Explanation:

  • Convert the given string to an all lowercase sentence joined by dashes.

type hint for next hint :pencil: [Contribute at the FCC Wiki]

Eran
@EranZzZ
Nov 16 2015 15:31
hint
CamperBot
@camperbot
Nov 16 2015 15:31

hint [3/7]

Hint: 1

  • Create a regex to for all white spaces and underscores.

type hint for next hint :pencil: [Contribute at the FCC Wiki]

Eran
@EranZzZ
Nov 16 2015 15:32
hint
CamperBot
@camperbot
Nov 16 2015 15:32

hint [4/7]

Hint: 2

  • You will also have to make everything lowercase.

type hint for next hint :pencil: [Contribute at the FCC Wiki]

Eran
@EranZzZ
Nov 16 2015 15:32
hint
CamperBot
@camperbot
Nov 16 2015 15:32

hint [5/7]

Hint: 3

  • The tricky part is getting the regex part to work, once you do that then just turn the uppercase to lowercase and replace spaces with underscores using replace()

type hint for next hint :pencil: [Contribute at the FCC Wiki]