JAVASCRIPT BUILT-IN FUNCTIONS NUMBER METHODS

Similar documents
About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer

Using Object- Oriented JavaScript

JavaScript Introduction

Web Programming Step by Step

Expense Management. Configuration and Use of the Expense Management Module of Xpert.NET

TESTING CENTER SARAS USER MANUAL

AIMMS Function Reference - Arithmetic Functions

Chapter 5 Functions. Introducing Functions

EXCEL FUNCTIONS MOST COMMON

SOME EXCEL FORMULAS AND FUNCTIONS

Excel 2003 Tutorials - Video File Attributes

Help on Icons and Drop-down Options in Document Editor

Handout 3 cs180 - Programming Fundamentals Spring 15 Page 1 of 6. Handout 3. Strings and String Class. Input/Output with JOptionPane.

FX 260 Training guide. FX 260 Solar Scientific Calculator Overhead OH 260. Applicable activities

Learn Neos. TypoScript 2. Pocket Reference. for TYPO3 Neos 1.1

Graphing Calculator Scientific Calculator Version 2.0

Function Name Algebra. Parent Function. Characteristics. Harold s Parent Functions Cheat Sheet 28 December 2015

Getting Started with MasteringPhysics

Infor LN CRM User Guide for CRM

Who Wants to Be a Mathematician: Beginner's Guide for Students

Exercise 4 Learning Python language fundamentals

Field Properties Quick Reference

Computer Programming I

CS106A, Stanford Handout #38. Strings and Chars

Overture ENTERPRISE CLASS A/V CONTROL. Reduce complexity and cost with a software based A/V control

Getting Started with

Useful Microsoft Excel Functions & Formulas Theresa A Scott, MS Department of Biostatistics Vanderbilt University theresa.scott@vanderbilt.

SAP BusinessObjects Business Intelligence platform Document Version: 4.1 Support Package Information Design Tool User Guide

VB.NET - STRINGS. By calling a formatting method to convert a value or object to its string representation

MATLAB Basics MATLAB numbers and numeric formats

Chapter 6 Reports. Base Handbook

grep, awk and sed three VERY useful command-line utilities Matt Probert, Uni of York grep = global regular expression print

Python Lists and Loops

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.

Trigonometry for AC circuits

xn. x must be written as x^(2n) and NOT as x^2n. Writing x^2n means 4x y would be written as 4 x^2 y^3 or with the multiplication mark as 4*x^2*y^3.

Algebra and Geometry Review (61 topics, no due date)

Excel: Introduction to Formulas

SECTION 2: Working with Functions and Formulas

IBM Unica Macros for IBM Unica Marketing Version 8 Release 6 May 25, User's Guide

Final Exam Review: VBA

The OptQuest Engine Java and.net Developer's Guilde

Higher Education Math Placement

Excel 2007 Tutorials - Video File Attributes

Introduction to Java. CS 3: Computer Programming in Java

Excel Level Two. Introduction. Contents. Exploring Formulas. Entering Formulas

LABORATORY 117. Intorduction to VoiceXML (2)

LAB 3 Part 1 OBJECTS & CLASSES

Dreamweaver: Getting Started Website Structure Why is this relevant?

Limitations of Data Encapsulation and Abstract Data Types

SAP BusinessObjects Business Intelligence platform Document Version: 4.1 Support Package Information Design Tool User Guide

Get post program 7 W.a.p. that Enter two numbers from user and do arithmetic operation

java Features Version April 19, 2013 by Thorsten Kracht

Ecma/TC39/2013/NN. 4 th Draft ECMA-XXX. 1 st Edition / July The JSON Data Interchange Format. Reference number ECMA-123:2009

Computing Concepts with Java Essentials

VB.NET Programming Fundamentals

Rational Exponents. Squaring both sides of the equation yields. and to be consistent, we must have

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Portal Connector Fields and Widgets Technical Documentation

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Creating web pages Chapter 3. HTML Basic Concepts

7-1. This chapter explains how to set and use Event Log Overview Event Log Management Creating a New Event Log...

Chapter 4 -- Decimals

Positional Numbering System

INSTALLATION AND CONFIGURATION MANUAL ENCODER

Innovative Techniques and Tools to Detect Data Quality Problems

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2

.NET Standard DateTime Format Strings

Commonly Used Excel Functions. Supplement to Excel for Budget Analysts

ERDAS Spatial Modeler Language Reference Manual

TMS320C67x FastRTS Library Programmer s Reference

Math Placement Test Study Guide. 2. The test consists entirely of multiple choice questions, each with five choices.

BLACKBOARD 9.1: Text Editor

6.170 Tutorial 3 - Ruby Basics

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Participant Guide RP301: Ad Hoc Business Intelligence Reporting

FX 115 MS Training guide. FX 115 MS Calculator. Applicable activities. Quick Reference Guide (inside the calculator cover)

SAP BusinessObjects Business Intelligence platform Document Version: 4.1 Support Package Information Design Tool User Guide

Quick Tour of Mathcad and Examples

JavaScript: Introduction to Scripting Pearson Education, Inc. All rights reserved.

My Account. In Taskstream. 71 WEST 23RD STREET, NEW YORK, NY T e help@taskstream.com

For live Java EE training, please see training courses

Java CPD (I) Frans Coenen Department of Computer Science

Computers. An Introduction to Programming with Python. Programming Languages. Programs and Programming. CCHSG Visit June Dr.-Ing.

ISI ACADEMY Web applications Programming Diploma using PHP& MySQL

Solution for Homework 2

Week 13 Trigonometric Form of Complex Numbers

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

Certified PHP/MySQL Web Developer Course

BA II Plus. Guidebook. Texas Instruments Instructional Communications. Dave Caldwell David Santucci Gary Von Berg

Mass . General Use

Perl in a nutshell. First CGI Script and Perl. Creating a Link to a Script. print Function. Parsing Data 4/27/2009. First CGI Script and Perl

Exercise 1: Python Language Basics

Core Maths C2. Revision Notes

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Many applications consist of one or more classes, each containing one or more methods. If you become part of a development team in industry, you may

MATH BOOK OF PROBLEMS SERIES. New from Pearson Custom Publishing!

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

What is HTML? a)hyper Text Marking Language b) Hyper Text Machine Language c)hyper Text Middle Language d)hyper Text Markup Language

Working with FirePass Portal Access (Reverse Proxy)

Transcription:

JAVASCRIPT BUILT-IN FUNCTIONS http://www.tutorialspoint.com/javascript/javascript_builtin_functions.htm NUMBER METHODS Copyright tutorialspoint.com The Number object contains only the default methods that are part of every object's definition. constructor toexponential tofixed tolocalestring toprecision Returns the function that created this object's instance. By default this is the Number object. Forces a number to display in exponential notation, even if the number is in the range in which JavaScript normally uses standard notation. Formats a number with a specific number of digits to the right of the decimal. Returns a string value version of the current number in a format that may vary according to a browser's locale settings. Defines how many total digits includingdigitstotheleftandrightofthedecimal to display of a number. Returns the string representation of the number's value. Returns the number's value. BOOLEAN METHODS Returns a string containing the source of the Boolean object; you can use this string to create an equivalent object. Returns a string of either "true" or "false" depending upon the value of the object. Returns the primitive value of the Boolean object. String s charat charcodeat concat indexof Returns the character at the specified index. Returns a number indicating the Unicode value of the character at the given index. Combines the text of two strings and returns a new string. Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.

lastindexof localecompare length match replace search slice split substr substring tolocalelowercase tolocaleuppercase tolowercase touppercase Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order. Returns the length of the string. Used to match a regular expression against a string. Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring. Executes the search for a match between a regular expression and a specified string. Extracts a section of a string and returns a new string. Splits a String object into an array of strings by separating the string into substrings. Returns the characters in a string beginning at the specified location through the specified number of characters. Returns the characters in a string between two indexes into the string. The characters within a string are converted to lower case while respecting the current locale. The characters within a string are converted to upper case while respecting the current locale. Returns the calling string value converted to lower case. Returns a string representing the specified object. Returns the calling string value converted to uppercase. Returns the primitive value of the specified object. STRING HTML WRAPPERS Here is a list of each method which returns a copy of the string wrapped inside the appropriate HTML tag. anchor big blink bold fixed fontcolor fontsize italics Creates an HTML anchor that is used as a hypertext target. Creates a string to be displayed in a big font as if it were in a <big> tag. Creates a string to blink as if it were in a <blink> tag. Creates a string to be displayed as bold as if it were in a <b> tag. Causes a string to be displayed in fixed-pitch font as if it were in a <tt> tag Causes a string to be displayed in the specified color as if it were in a <font color="color"> tag. Causes a string to be displayed in the specified font size as if it were in a <font size="size"> tag. Causes a string to be italic, as if it were in an <i> tag.

link small strike sub sup Creates an HTML hypertext link that requests another URL. Causes a string to be displayed in a small font, as if it were in a <small> tag. Causes a string to be displayed as struck-out text, as if it were in a <strike> tag. Causes a string to be displayed as a subscript, as if it were in a <sub> tag Causes a string to be displayed as a superscript, as if it were in a <sup> tag Array s concat every filter foreach indexof join lastindexof map pop push reduce reduceright reverse shift slice some sort splice Returns a new array comprised of this array joined with other arrays and/or values. Returns true if every element in this array satisfies the provided testing function. Creates a new array with all of the elements of this array for which the provided filtering function returns true. Calls a function for each element in the array. Returns the first least index of an element within the array equal to the specified value, or -1 if none is found. Joins all elements of an array into a string. Returns the last greatest index of an element within the array equal to the specified value, or -1 if none is found. Creates a new array with the results of calling a provided function on every element in this array. Removes the last element from an array and returns that element. Adds one or more elements to the end of an array and returns the new length of the array. Apply a function simultaneously against two values of the array fromleft to right as to reduce it to a single value. Apply a function simultaneously against two values of the array fromright to left as to reduce it to a single value. Reverses the order of the elements of an array -- the first becomes the last, and the last becomes the first. Removes the first element from an array and returns that element. Extracts a section of an array and returns a new array. Returns true if at least one element in this array satisfies the provided testing function. Represents the source code of an object Sorts the elements of an array. Adds and/or removes elements from an array.

unshift Returns a string representing the array and its elements. Adds one or more elements to the front of an array and returns the new length of the array. Date s: Date getdate getday getfullyear gethours getmilliseconds getminutes getmonth getseconds gettime gettimezoneoffset getutcdate getutcday getutcfullyear getutchours getutcmilliseconds getutcminutes getutcmonth getutcseconds getyear setdate Returns today's date and time Returns the day of the month for the specified date according to local Returns the day of the week for the specified date according to local Returns the year of the specified date according to local Returns the hour in the specified date according to local Returns the milliseconds in the specified date according to local Returns the minutes in the specified date according to local Returns the month in the specified date according to local Returns the seconds in the specified date according to local Returns the numeric value of the specified date as the number of milliseconds since January 1, 1970, 00:00:00 UTC. Returns the time-zone offset in minutes for the current locale. Returns the day date of the month in the specified date according to universal Returns the day of the week in the specified date according to universal Returns the year in the specified date according to universal Returns the hours in the specified date according to universal Returns the milliseconds in the specified date according to universal Returns the minutes in the specified date according to universal Returns the month in the specified date according to universal Returns the seconds in the specified date according to universal Deprecated - Returns the year in the specified date according to local Use getfullyear instead. Sets the day of the month for a specified date according to local

setfullyear sethours setmilliseconds setminutes setmonth setseconds settime setutcdate setutcfullyear setutchours setutcmilliseconds setutcminutes setutcmonth setutcseconds setyear todatestring togmtstring tolocaledatestring tolocaleformat tolocalestring tolocaletimestring totimestring toutcstring Sets the full year for a specified date according to local Sets the hours for a specified date according to local Sets the milliseconds for a specified date according to local Sets the minutes for a specified date according to local Sets the month for a specified date according to local Sets the seconds for a specified date according to local Sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC. Sets the day of the month for a specified date according to universal Sets the full year for a specified date according to universal Sets the hour for a specified date according to universal Sets the milliseconds for a specified date according to universal Sets the minutes for a specified date according to universal Sets the month for a specified date according to universal Sets the seconds for a specified date according to universal Deprecated - Sets the year for a specified date according to local Use setfullyear instead. Returns the "date" portion of the Date as a human-readable string. Deprecated - Converts a date to a string, using the Internet GMT conventions. Use toutcstring instead. Returns the "date" portion of the Date as a string, using the current locale's conventions. Converts a date to a string, using a format string. Converts a date to a string, using the current locale's conventions. Returns the "time" portion of the Date as a string, using the current locale's conventions. Returns a string representing the source for an equivalent Date object; you can use this value to create a new object. Returns a string representing the specified Date object. Returns the "time" portion of the Date as a human-readable string. Converts a date to a string, using the universal time convention. Returns the primitive value of a Date object. Date Static s: In addition to the many instance methods listed previously, the Date object also defines two static methods. These methods are invoked through the Date constructor itself:

Date.parse Date.UTC Parses a string representation of a date and time and returns the internal millisecond representation of that date. Returns the millisecond representation of the specified UTC date and Math s abs acos asin atan atan2 ceil cos exp floor log max min pow Returns the absolute value of a number. Returns the arccosine inradians of a number. Returns the arcsine inradians of a number. Returns the arctangent inradians of a number. Returns the arctangent of the quotient of its arguments. Returns the smallest integer greater than or equal to a number. Returns the cosine of a number. Returns E N, where N is the argument, and E is Euler's constant, the base of the natural logarithm. Returns the largest integer less than or equal to a number. Returns the natural logarithm basee of a number. Returns the largest of zero or more numbers. Returns the smallest of zero or more numbers. Returns base to the exponent power, that is, base exponent. random Returns a pseudo-random number between 0 and 1. round sin sqrt tan Returns the value of a number rounded to the nearest integer. Returns the sine of a number. Returns the square root of a number. Returns the tangent of a number. Returns the string "Math". RegExp s: exec test Executes a search for a match in its string parameter. Tests for a match in its string parameter.

Returns an object literal representing the specified object; you can use this value to create a new object. Returns a string representing the specified object. Processing math: 100%