Skip to content

Latest commit

 

History

History
53 lines (34 loc) · 800 Bytes

primitives.md

File metadata and controls

53 lines (34 loc) · 800 Bytes
description
Dealing with primitives

Dealing with primitives

Using booleans

The example below creates a Boolean instance with the value of true.

myBoolean = true;

Using characters

The example below creates a Character instance with the value of 'a'.

myCharacter = 'a';

Using integers

The example below creates an Integer instance with the value of 1234.

myInteger = 1234;

Using nil

The example below creates a Nil instance.

myObject = nil;

Using strings

The example below creates a String instance with the value of "1234".

myString = "1234";

Using floating point numbers

The example below creates an Float instance with the value of 1.234.

myFloat = 1.234;