Phaser API Documentation

  Version: 
hasBoth(object, key1, key2)

Description:

Check whether an object has both of the given properties.

Parameters:

name type description
object object

The object to check.

key1 string

The key of the first property to check the object for.

key2 string

The key of the second property to check the object for.

Returns:
Description:

true if both properties exist in the object, false otherwise.

Type:
  • boolean
Since: 3.0.0