Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: Get nth double character

Write a function that receives a string and returns the nth character that is duplicated.

"xyzaabb", 1   -> a
"xyzaabb", 2   -> b