pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf

ref="https://developer.mozilla.org/favicon.ico" />

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

String.prototype.valueOf()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.

String 값의 valueOf() 메서드는 String 이 문자열 값을 반환합니다.

시도해 보기

const stringObj = new String("foo");

console.log(stringObj);
// Expected output: String { "foo" }

console.log(stringObj.valueOf());
// Expected output: "foo"

구문

js
valueOf()

매개변수

없음.

반환 값

주어진 String 객체의 원시 값을 나타내는 문자열.

설명

StringvalueOf() 메서드는 String 객체의 원시 값을 문자열 데이터 타입으로 반환 합니다. 이 값은 String.prototype.toString().과 동일합니다.

이 메서드는 보통 JavaScript에 의해 내부적으로 호출되며, 코드에서 명시적으로 사용하지는 않습니다.

예제

valueOf() 사용하기

js
const x = new String("Hello world");
console.log(x.valueOf()); // 'Hello world'

명세서

Specification
ECMAScript® 2026 Language Specification
# sec-string.prototype.valueof

브라우저 호환성

같이 보기

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy