| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf | [Back] [Original] |
Get to know MDN better
const stringObj = new String("foo");
console.log(stringObj);
// : String { "foo" }
console.log(stringObj.valueOf());
// : "foo"
valueOf()
String valueOf() String String.prototype.toString()
JavaScript
valueOf() const x = new String("Hello world");
console.log(x.valueOf()); // 'Hello world'
| ECMAScript 2027 LanguageSpecification # sec-string.prototype.valueof |
Stringanchor()at()big()blink()bold()charAt()charCodeAt()codePointAt()concat()endsWith()fixed()fontcolor()fontsize()includes()indexOf()isWellFormed()italics()lastIndexOf()link()localeCompare()match()matchAll()normalize()padEnd()padStart()repeat()replace()replaceAll()search()slice()small()split()startsWith()strike()sub()substr()substring()sup()toLocaleLowerCase()toLocaleUpperCase()toLowerCase()toString()toUpperCase()toWellFormed()trim()trimEnd()trimStart()valueOf()[Symbol.iterator]()Object/Function| Web Proxy Viewer | New URL | Original Page |