//Hungarian notation used to indicate data type
var bFound; //Boolean
var iCount; //integer
var sName; //string
var oPerson; //object
a - array
i - integer
f - float
s - string
c - class
m - method / module
f - function
o - object
b - boolean
//type comments used to indicate type
var found /*:Boolean*/ = false;
var count /*:int*/ = 10;
var name /*:String*/ = "Nicholas";
var person /*:Object*/ = null;
// Swift style
var someMyConstant = 10;
var someMyInteger = 1;
var someMyFloat = 1.0;
var someMyString = 'abc';
var someMyBoolean = true;
var someMyArray = [];
var someMyObject = {};
var someMyFunction = function someMyFunction () {};
var SomeMyClass = (function(){var SomeMyClass = function(){} return SomeMyClass;})();
var someMyMethod = function someMyMethod () {};
var someMyModule = (function(){function someMyFunction () {} return someMyFunction ;})();
var someMyController = function someMyController () {};
var someMyjQuery = $('body');
Комментариев нет:
Отправить комментарий