文字列の最初と最後の文字をつなげて返すような関数を作成しましょう。 もし文字が一つしかない場合、その文字は最初と最後の文字のため、関数はその文字を二回返すようにしておきましょう。
例:
stringfirstandlast('boring example') = 'be'
Back to basics 9 - Indexed References
348 Solvers
624 Solvers
Reverse the elements of an array
564 Solvers
296 Solvers
272 Solvers