Skip to content

Latest commit

 

History

History

check-unique-characters

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Write a function that checks the input string for unique characters (two variants)


Variant 1:

Input:

const inputString1 = "4rontender";
const inputString2 = "coder";

Output:

checkUniqueChars(inputString1); // "4rontender": false

checkUniqueChars(inputString2); // "coder": true

Variant 2:

Input:

const inputString1 = "abcdef";
const inputString2 = "123456";
const inputString3 = "abcABC";
const inputString4 = "abcaef";

Output:

isUnique(inputString1); // "abcdef", true
isUnique(inputString2); // "123456", true
isUnique(inputString3); // "abcABC", true
isUnique(inputString4); // "abcaef", false