Skip to content

Latest commit

 

History

History
59 lines (49 loc) · 2.1 KB

File metadata and controls

59 lines (49 loc) · 2.1 KB
title ms.custom ms.date ms.prod ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
valueOf Method (Object) (JavaScript) | Microsoft Docs
01/18/2017
windows-client-threshold
devlang-javascript
language-reference
valueOf
JavaScript
TypeScript
DHTML
valueOf method
c555e38b-f451-4341-8fcd-4c8b02906a2c
10
mikejo5000
mikejo
ghogen

valueOf Method (Object) (JavaScript)

Returns the primitive value of the specified object.

Syntax

  
object.valueOf( )  

Remarks

The required object reference is any intrinsic [!INCLUDEjavascript] object.

The valueOf method is defined differently for each intrinsic [!INCLUDEjavascript] object.

Object Return Value
Array Returns the array instance.
Boolean The Boolean value.
Date The stored time value in milliseconds since midnight, January 1, 1970 UTC.
Function The function itself.
Number The numeric value.
Object The object itself. This is the default.
String The string value.

The Math and Error objects do not have a valueOf method.

Requirements

[!INCLUDEjsv2]

Applies To: Array Object| Boolean Object| Date Object| Function Object| Number Object| Object Object| String Object

See Also

toString Method (Object)