Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Tags
#javascript #object #string #syntax
Question
For these reasons, code may break when it encounters [...] when it expects a primitive string instead,
Answer
String objects

Tags
#javascript #object #string #syntax
Question
For these reasons, code may break when it encounters [...] when it expects a primitive string instead,
Answer
?

Tags
#javascript #object #string #syntax
Question
For these reasons, code may break when it encounters [...] when it expects a primitive string instead,
Answer
String objects
If you want to change selection, open original toplevel document below and click on "Move attachment"

Parent (intermediate) annotation

Open it
For these reasons, code may break when it encounters String objects when it expects a primitive string instead,

Original toplevel document

String - JavaScript | MDN
ar 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" <span>For these reasons, code may break when it encounters String objects when it expects a primitive string instead, although generally authors need not worry about the distinction. A String object can always be converted to its primitive counterpart with the valueOf() method. console.log(ev

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.