Skip to end of metadata
Go to start of metadata

These standard JavaScript functions—part of ECMA-262 v5.1—are supported in Jitterbit JavaScripts.

    Page not found for multiexcerpt macro.
The page: Jitterbit Script Language was not found. Please check/update the page name used in the 'multiexcerpt-include' macro.

JavaScript Array Properties and Functions

Array Property

Description
array.constructor

Returns the function that creates the Array object's prototype

array.length

Returns the length of an array

Array.prototype

The object that allows adding properties and methods to an Array object

Array Function

Description
array.concat

Joins two or more arrays, returning a copy of the joined arrays

array.every

Checks if every element in an array pass a test (function)

array.filter

Creates a new array with every element in an array that pass a test (function)

array.forEach

Calls a function for each element in an array

array.indexOf

Searches an array for an element and returns its position

Array.isArray

Checks if an object is an array

array.join

Joins all the elements of an array into a string

array.lastIndexOf

Searches an array for an element, starting at the end, and returns its position

array.map

Creates a new array with the result of calling a function for each element in an array

array.pop

Removes the last element of an array and returns that element

array.push

Adds new elements at the end of an array and returns the new length

array.reduce

Reduces the values of an array to a single value (from left-to-right)

array.reduceRight

Reduces the values of an array to a single value (from right-to-left)

array.reverse

Reverses the order of the elements in an array

array.shift

Removes the first element of an array, and returns that element

array.slice

Selects a portion of an array and returns the new array

array.some

Checks if any of the elements in an array pass a test (function)

array.sort

Sorts the elements of an array

array.splice

Adds or removes elements from an array

array.toLocaleString

Converts an array to a string and returns the result, using locale conventions

array.toString

Converts an array to a string and returns the result

array.unshift

Adds new elements to the beginning of an array and returns the new length

array.valueOf

Returns the primitive value of an array

JavaScript Date Properties and Functions

WARNING: ECMA-262 v5.1 has issues with the handling of dates and daylight savings time. Be aware of these if using these functions.

Date Property

Description
date.constructor

Returns the function that creates the Array object's prototype

Date.prototype

The object that allows adding properties and methods to a Date object

Date Function

Description
date.getDate

Returns the day of the month (from 1-31)

date.getDay

Returns the day of the week (from 0-6)

date.getFullYear

Returns the year

date.getHoursReturns the hour (from 0-23)
date.getMillisecondsReturns the milliseconds (from 0-999)
date.getMinutesReturns the minutes (from 0-59)
date.getMonthReturns the month (from 0-11)
date.getSecondsReturns the seconds (from 0-59)
date.getTimeReturns the number of milliseconds since midnight January 1 1970, and a specified date
date.getTimezoneOffsetReturns the time difference between UTC time and local time, in minutes
date.getUTCDateReturns the day of the month, according to universal time (from 1-31)
date.getUTCDayReturns the day of the week, according to universal time (from 0-6)
date.getUTCFullYearReturns the year, according to universal time
date.getUTCHoursReturns the hour, according to universal time (from 0-23)
date.getUTCMillisecondsReturns the milliseconds, according to universal time (from 0-999)
date.getUTCMinutesReturns the minutes, according to universal time (from 0-59)
date.getUTCMonthReturns the month, according to universal time (from 0-11)
date.getUTCSeconds

Returns the seconds, according to universal time (from 0-59)

date.getFullYearReturns the full year
Date.nowReturns the number of milliseconds since midnight January 1, 1970
Date.parseParses a date string and returns the number of milliseconds since midnight January 1, 1970
date.setDateSets the day of the month of a Date object
date.setFullYearSets the year of a Date object
date.setHoursSets the hour of a Date object
date.setMillisecondsSets the milliseconds of a Date object

date.setMinutes

Set the minutes of a Date object
date.setMonthSets the month of a Date object
date.setSecondsSets the seconds of a Date object
date.setTimeSets a date of a Date object to a specified number of milliseconds after/before January 1, 1970
date.setUTCDateSets the day of the month of a Date object, according to universal time
date.setUTCFullYearSets the year of a Date object, according to universal time
date.setUTCHoursSets the hour of a Date object, according to universal time
date.setUTCMillisecondsSets the milliseconds of a Date object, according to universal time
date.setUTCMinutesSet the minutes of a Date object, according to universal time
date.setUTCMonthSets the month of a Date object, according to universal time
date.setUTCSecondsSet the seconds of a Date object, according to universal time
date.toDateStringConverts the date portion of a Date object into a readable string
date.toISOString

Returns a date as a string, using the ISO standard

date.toJSONReturns a date as a string, formatted as a JSON date
date.toLocaleDateStringReturns the date portion of a Date object as a string, using locale conventions
date.toLocaleTimeStringReturns the time portion of a Date object as a string, using locale conventions
date.toLocaleStringConverts a Date object to a string, using locale conventions
date.toStringConverts a Date object to a string
date.toTimeStringConverts the time portion of a Date object to a string
date.toUTCStringConverts a Date object to a string, according to universal time
Date.UTCReturns the number of milliseconds in a date since midnight January 1, 1970, according to UTC time
date.valueOfReturns the primitive value of a Date object

JavaScript Math Properties and Functions

Math Property

Description
Math.EReturns Euler's number (about 2.71828182845905)
Math.LN2Returns the natural logarithm of 2 (about 0.693147180559945)
Math.LN10Returns the natural logarithm of 10 (about 2.30258509299405)
Math.LOG2EReturns the base-2 logarithm of e (about 1.44269504088896)
Math.LOG10EReturns the base-10 logarithm of e (about 0.434294481903252)
Math.PIReturns π (about 3.14159265358979)
Math.SQRT1_2Returns the square root of 1/2 (about 0.707106781186548)
Math.SQRT2Returns the square root of 2 (about 1.4142135623731)

Math Function

Description
Math.abs(x)

Returns the absolute value of x

Math.ceil(x)Returns x rounded up to the nearest integer
Math.exp(x) Returns the value of ex
Math.floor(x)Returns x rounded down to the nearest integer
Math.max(x, y, z)Returns the number with the lowest value
Math.min(x, y, z)Returns the number with the highest value
Math.pow(x, y)Returns the value of x to the power of y
Math.random()Returns a random number between 0 and 1
Math.sqrt(x) Returns the square root of x
Math.acos(x) Returns the arccosine of x (where x is in radians)
Math.asin(x)Returns the arcsine of x (where x is in radians)
Math.atan(x) Returns the arctangent of x as a numeric value between -π/2 and π/2 radians
Math.atan2(y, x)Returns the arctangent of the quotient of its arguments
Math.cos(x)Returns the cosine of x (where x is in radians)
Math.log(x)Returns the natural logarithm (base e) of x
Math.round(x)Rounds x to the nearest integer
Math.sin(x)Returns the sine of x (where x is in radians)
Math.tan(x)Returns the tangent of x (where x is in radians)

JavaScript String Properties and Functions

String Property

Description
string.constructor

Returns the function that creates the String object's prototype

string.length

Returns the length of a string

String.prototypeThe object that allows adding properties and methods to a String object

String Function

Description
string.charAt

Returns the character at the specified index (position)

string.charCodeAt

Returns the Unicode of the character at the specified index

string.concat

Joins two or more strings, and returns a new joined strings

string.endsWithChecks whether a string ends with specified string/characters
string.indexOfReturns the position of the first found occurrence of a specified value in a string
string.lastIndexOfReturns the position of the last found occurrence of a specified value in a string
string.localeCompareCompares two strings in the current locale
string.matchSearches a string for a match against a regular expression, and returns the matches
string.replaceSearches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced
string.searchSearches a string for a specified value, or regular expression, and returns the position of the match
string.sliceExtracts a part of a string and returns a new string
string.splitSplits a string into an array of substrings
string.startsWithChecks whether a string begins with specified characters
string.substr

Extracts the characters from a string, beginning at a specified start position, and through the specified number of character

string.substringExtracts the characters from a string, between two specified indices
string.toLocaleLowerCaseConverts a string to lowercase letters, according to the host's locale
string.toLocaleUpperCaseConverts a string to uppercase letters, according to the host's locale
string.toLowerCaseConverts a string to lowercase letters
string.toStringReturns the value of a String object
string.toUpperCaseConverts a string to uppercase letters
string.trimRemoves whitespace from both ends of a string
string.valueOfReturns the primitive value of a String object


 

  • No labels