# La clase MongoDB\BSON\Javascript

(mongodb >=1.0.0)

## Introducción

## Sinopsis de la Clase

class MongoDB\BSON\Javascript implements MongoDB\BSON\Type {
/* Métodos */
final public __construct(string `$code`, array|object|null `$scope` = `null`)
final public getCode(): string
final public getScope(): ?object
final public jsonSerialize(): mixed
final public serialize(): string
final public __toString(): string
final public unserialize(string `$data`): void
}

## Tabla de contenidos

- MongoDB\BSON\Javascript::__construct — Construct a new Javascript
- MongoDB\BSON\Javascript::getCode — Returns the Javascript's code
- MongoDB\BSON\Javascript::getScope — Returns the Javascript's scope document
- MongoDB\BSON\Javascript::jsonSerialize — Returns a representation that can be converted to JSON
- MongoDB\BSON\Javascript::serialize — Serialize a Javascript
- MongoDB\BSON\Javascript::__toString — Returns the Javascript's code
- MongoDB\BSON\Javascript::unserialize — Unserialize a Javascript