Logo

Programming-Idioms

History of Idiom 5 > diff from v18 to v19

Edit summary for version 19 by :

Version 18

2015-09-04, 13:25:31

Version 19

2015-10-23, 06:17:28

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Imports
Imports
HT8p7n http://www.FyLitCl7Pf7kjQdDUOLQOuaxTXbj5iNG.com
Code
var p = { x: 1.122, y: 7.45 };
Code
HT8p7n http://www.FyLitCl7Pf7kjQdDUOLQOuaxTXbj5iNG.com
Comments bubble
Types are implicit. Just initialize a variable.
Doc URL
http://www.FyLitCl7Pf7kjQdDUOLQOuaxTXbj5iNG.com
Origin
http://www.FyLitCl7Pf7kjQdDUOLQOuaxTXbj5iNG.com
Demo URL
http://www.FyLitCl7Pf7kjQdDUOLQOuaxTXbj5iNG.com