How to compare two strings in TypeScript

1 Answer

0 votes
const str1: string = "typescript";
const str2: string = "typescript";
   
console.log(str1 === str2); 
     
       
       
/*
run:
 
true
       
*/

 



answered Mar 17, 2025 by avibootz
...