Ad
Strings
Data Types
split
Haskell Packages

Basics

Verlan is a type of argot in the french language and is common in slang and youth language.
It rests on a long french tradition of transposing syllables of individual words to create slang words.
The word itself is an example for verlan.

Task

In this example you will create a function that takes a word and makes a verlan word out of it.

e.g.

  • Maestro => Stromae
  • Verlan => Lanver
function maestroSplit(string) {
  let newWord = string.slice(parseInt(string.length / 2)) + string.slice(0, parseInt(string.length / 2));
  return newWord.toLowerCase().charAt(0).toUpperCase() + newWord.toLowerCase().slice(1);
}