All Products
Search
Document Center

CDN:Debug function

Last Updated:Jun 04, 2024

This topic describes the syntax, parameters, example, and return value of the debug function.

type

The following table describes the details about this function.

Item

Description

Syntax

type(s)

Description

Tests the type of the s variable.

Parameters

You can specify only one parameter.

Return value

The type of the s variable is returned.

Example

m = type('100')
n = type(100)
t = type(['a', 'b'])
say(concat('type(m)=', m))
say(concat('type(n)=', n))
say(concat('type(t)=', t))

Output:
type(m)=string
type(n)=number
type(t)=table
Note

The return value of this function is of the string type.