Skip to content

Instantly share code, notes, and snippets.

@a1exlism a1exlism/js_point.js
Created Aug 11, 2016

Embed
What would you like to do?
Multiple meaning of point in JavaScript
/* .的含义
1、表示算术中的小数点(浮点数),如 2.5
2、取对象属性、方法,如 [].push(2)
*/
1.toString(); //Error
1..toString(); //Works well
1 .toString(); //Works well
/*
From: http://www.cnblogs.com/snandy/p/3169632.html
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.