JsNumberToInt Function

Retrieves the int value of a number value.

Syntax

STDAPI_(JsErrorCode) JsNumberToInt(  
      _In_ JsValueRef value,  
      _Out_ int *intValue  
);  

Parameters

value
The number value to convert to an int value.

intValue
The int value.

Return Value

Remarks

This function retrieves the value of a number value and converts to an int value. It will fail with JsErrorInvalidArgument if the type of the value is not number.

Requires an active script context.

This API is supported only in EdgeHTML mode.

Requirements

Header: jsrt.h

See Also

Reference (JavaScript Runtime)