Forum Discussion
TestQA1
2 years agoFrequent Contributor
What if I write my own logic and don't use Compare methods.
I tried a below code but the loop seems to be running more than the indexes/lines I have in the first file and the values at index shows single character.
function CompareFiles() {
var firstFile = "abc.txt";
var secFile = "aac.txt";
for(let i =0; i<firstFile.length;i++) {
if(firstFile[i] !== secFile[i])
return true;
else {
return false;
}
}
}
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
Recent Discussions
Working with Visual Test
Solved2 days agoBypassing TC engine
Solved2 days ago