DEV Community

Discussion on: The bane of every developer; spelling, casing, and random commas

vlasales profile image
Vlastimil Pospichal
const firstValue = process.argv[2].toLowerCase();
const secondValue = process.argv[3].toLowerCase();
if (firstValue < secondValue) {
    console.log(-1);
} else if (firstValue > secondValue) {
    console.log(1);
} else {
    console.log(0);
}
Thread Thread
mishmanners profile image
Michelle Mannering Author

Thanks for this. Will check it out