GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — javascript/numbers/create.md at master · octatone/javascript

Expand file tree

/

create.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
42 lines (28 loc) · 520 Bytes
/

create.md

Copy path

File metadata and controls

42 lines (28 loc) · 520 Bytes
Raw
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);

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.