filmov
tv
2. Double String Characters | JavaScript | Coding Interview | Challenge

Показать описание
You are given a string as an argument. Return a string in which each character is doubled. If any data type other than a string is passed as an argument, return a message that says `not a string!`.
Example:
doubleStrChars('DevLeague') // returns 'DDeevvLLeeaagguuee'
doubleStrChars('Hello!') // returns 'HHeelllloo!!'
doubleStrChars(true) // returns 'not a string!'
doubleStrChars(2468) // returns 'not a string!'
#javascript #interview #codingchallenge #interviewquestions #strings #doblestringcharacters #askfaran
Example:
doubleStrChars('DevLeague') // returns 'DDeevvLLeeaagguuee'
doubleStrChars('Hello!') // returns 'HHeelllloo!!'
doubleStrChars(true) // returns 'not a string!'
doubleStrChars(2468) // returns 'not a string!'
#javascript #interview #codingchallenge #interviewquestions #strings #doblestringcharacters #askfaran