Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

2 of 2
Updated to match the requirements
Kamil Drakari
  • 4.4k
  • 12
  • 21

Japt, 18 bytes

®ou qÃov
ò mq'_ q-

Try it

Input as an array of character arrays.

Explanation:

®ou qÃov 
® Ã # For each word in the input:
 ou # Convert the last letter to uppercase
 q # Join to a string
 o # For the last word:
 v # Convert it to lowercase
 # Save as U
ò mq'_ q- 
ò # Cut U into pairs of words
 m # For each pair:
 q'_ # Join to a single string with "_" in between
 q- # Join all those strings with "-" between
Kamil Drakari
  • 4.4k
  • 12
  • 21

AltStyle によって変換されたページ (->オリジナル) /