Skip to content
Manuel Zarat edited this page Dec 18, 2024 · 29 revisions

There are 6 general data types.

  • Char
  • Integer
  • Double
  • String
  • Array
  • Object
var a = 1;
var b = 'c';
var c = 3.14159;
var d = "Hello";
var e = "world";
var f = d + e;
var g = [1, 2.1, "Hello"];
var h = { "a": 1, "b": 2};
var i = function(a, b) { ... }
function j(a, b) { ... }

Each of them has its own set of methods.

Char

  • Char.parse(val)

Integer

  • Integer.rand()
  • Integer.range(min, max)
  • Integer.parse(val)
  • Integer.hex(fmt)
  • Integer.bin(len)

Double

  • Double.parse(val)

String

  • String.trim()
  • String.ltrim()
  • String.rtrim()
  • Array String.indexOf(val)
  • String.substring(startPos, endPos)
  • Char String.charAt(pos)
  • Integer String.charCodeAt(pos)
  • String.fromCharCode(int)
  • Array String.split(separator)
  • String.replace(from, to) // case sensitive
  • String.replaceAll(from, to) // case sensitive
  • String.toLower()
  • String.toUpper()
  • String.toArray()

Array

  • Integer Array.count()
  • Integer Array.contains(val)
  • Array Array.remove(val)
  • Array.insert(index, obj)
  • String Array.join(separator)
  • Array Array.concat(arr)
  • Array.each(function)
  • Array Array.reverse()
  • Array.shift() // test
  • Array Array.sort()
  • Array.unique() // test
  • Array.push(obj)
  • Array.pop()
  • Array Array.slice(start, end) // todo endPos + 1

Object

  • Object.clone() // deprecated
  • Object.count()
  • Object.memberAt(pos)
  • Object.removeAt(pos)
Clone this wiki locally