Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 657 Bytes

File metadata and controls

36 lines (29 loc) · 657 Bytes

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