Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
42 lines (28 loc) · 522 Bytes

File metadata and controls

42 lines (28 loc) · 522 Bytes
Copy raw file
Download raw file
Edit and raw actions

Creation

Creating a number is easy, it can be done just like for any other variable type using the var keyword.

Numbers can be created from a constant value:

// This is a float:
var a = 1.2;

// This is a integer:
var b = 10;

Or from the value of another variable:

var a = 2;
var b = a;

Create a variable x which equals 10 and create a variable y which equals a.

var a = 11;
var a = 11;

var x = 10;
var y = a;
assert(x === 10 && y === a);

Morty Proxy This is a proxified and sanitized view of the page, visit original site.