Docly Developers
Function Updated 17 Oct 2026

areEqual(value1, value2)

Checks if value1 and value2 are equal. Typically used to validate that two fields match (e.g. password confirmation).

Values are compared with .NET equality, not with JavaScript ==: there is no type conversion, so "1" and 1 are not equal, and two objects or arrays are equal only if they are the same instance. Two null values are equal.

Parameters

value1objectrequired

Value to compare with value2.

value2objectrequired

Value to compare with value1.

Returns

true if value1 and value2 are equal, otherwise false. Also false if not called with exactly two arguments.

Example

Mixed HTML (or any text file) with inline JavaScript between hash signs.
#docly.areEqual(password, confirm) ? "Match" : "No match"#