Tags
#javascript #object #string #syntax
Question

C developers have the strcmp() function for comparing strings. In JavaScript,

[...]
 var a = 'a' ; var b = 'b' ; if ( a < b ) { // true console . log ( a + ' is less than ' + b ) ; } else if ( a > b ) { console . log ( a + ' is greater than ' + b ) ; } else { console . log ( a + ' and ' + b + ' are equal.' ) ; } 

Tags
#javascript #object #string #syntax
Question

C developers have the strcmp() function for comparing strings. In JavaScript,

[...]
 var a = 'a' ; var b = 'b' ; if ( a < b ) { // true console . log ( a + ' is less than ' + b ) ; } else if ( a > b ) { console . log ( a + ' is greater than ' + b ) ; } else { console . log ( a + ' and ' + b + ' are equal.' ) ; } 
?

Tags
#javascript #object #string #syntax
Question

C developers have the strcmp() function for comparing strings. In JavaScript,

[...]
 var a = 'a' ; var b = 'b' ; if ( a < b ) { // true console . log ( a + ' is less than ' + b ) ; } else if ( a > b ) { console . log ( a + ' is greater than ' + b ) ; } else { console . log ( a + ' and ' + b + ' are equal.' ) ; } 
If you want to change selection, open original toplevel document below and click on "Move attachment"

#### Parent (intermediate) annotation

Open it
C developers have the strcmp() function for comparing strings. In JavaScript, you just use the less-than and greater-than operators: var a = 'a' ; var b = 'b' ; if ( a < b ) { // true console . log ( a + ' is less than ' + b ) ; } else if ( a > b ) { console . log ( a + ' is greater than ' + b ) ; } else { c

#### Original toplevel document

String - JavaScript | MDN
using bracket notation, attempting to delete or assign a value to these properties will not succeed. The properties involved are neither writable nor configurable. (See Object.defineProperty() for more information.) Comparing strings <span>C developers have the strcmp() function for comparing strings. In JavaScript, you just use the less-than and greater-than operators: var a = 'a'; var b = 'b'; if (a < b) { // true console.log(a + ' is less than ' + b); } else if (a > b) { console.log(a + ' is greater than ' + b); } else { console.log(a + ' and ' + b + ' are equal.'); } A similar result can be achieved using the localeCompare() method inherited by String instances. Distinction between string primitives and String objects Note that JavaSc

#### Summary

status measured difficulty not learned 37% [default] 0

No repetitions