String primitives and String
objects also give different results when using [...] Primitives passed to eval
are treated as source code; String
objects are treated as all other objects are, by returning the object. For example:
var s1 = '2 + 2' ; // creates a string primitive var s2 = new String ( '2 + 2' ) ; // creates a String object console . log ( eval ( s1 ) ) ; // returns the number 4 console . log ( eval ( s2 ) ) ; // returns the string "2 + 2"
String primitives and String
objects also give different results when using [...] Primitives passed to eval
are treated as source code; String
objects are treated as all other objects are, by returning the object. For example:
var s1 = '2 + 2' ; // creates a string primitive var s2 = new String ( '2 + 2' ) ; // creates a String object console . log ( eval ( s1 ) ) ; // returns the number 4 console . log ( eval ( s2 ) ) ; // returns the string "2 + 2"
String primitives and String
objects also give different results when using [...] Primitives passed to eval
are treated as source code; String
objects are treated as all other objects are, by returning the object. For example:
var s1 = '2 + 2' ; // creates a string primitive var s2 = new String ( '2 + 2' ) ; // creates a String object console . log ( eval ( s1 ) ) ; // returns the number 4 console . log ( eval ( s2 ) ) ; // returns the string "2 + 2"
status | not learned | measured difficulty | 37% [default] | last interval [days] | |||
---|---|---|---|---|---|---|---|
repetition number in this series | 0 | memorised on | scheduled repetition | ||||
scheduled repetition interval | last repetition or drill |