check typescript version
tsc -v
check anagramm in typescript
'use strict';
let text1: string = 'mode';
let text2: string = 'demo';
function anagram(text1: string, text2: string): boolean {
if (text1.length !== text2.length) {
return false;
}
if (text1 === text2) {
return false;
}
let charString1 = text1.split('').sort().join('');
let charString2 = text2.split('').sort().join('');
return charString1 === charString2;
}
console.log(anagram(text1, text2));
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us