{"id":7595,"date":"2013-01-28T12:06:17","date_gmt":"2013-01-28T12:06:17","guid":{"rendered":"http:\/\/vskills.in\/certification\/tutorial\/?p=7595"},"modified":"2024-04-12T14:17:06","modified_gmt":"2024-04-12T08:47:06","slug":"predefined-javascript-functions","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/","title":{"rendered":"Predefined JavaScript functions"},"content":{"rendered":"<p>Javascript has many pre-defined functions and functions which are used extensively are<\/p>\n<p><strong>Conversion and Comparison<\/strong> \u2013 Functions used for data conversion and comparison<\/p>\n<p><u>escape(string)<\/u> &#8211; Encodes a string from ASCII into an ISO Latin-1 (ISO 8859-1) character set for HTML processing. It is passed the string to be encoded, and returns the encoded string.<\/p>\n<p><u>unescape<\/u> &#8211; Converts an ISO8859-1 character set to ASCII.<\/p>\n<p><u>eval()<\/u>&#8211; Converts a string to integer or float value.<\/p>\n<p><u>isNaN(value)<\/u> &#8211; If the value passed is a not a number, the boolean value of true is returned, if it is a number, it returns false.<\/p>\n<p><u>parseFloat()<\/u> &#8211; Returns floating point numbers the same as the parseInt function, but looks for floating point qualified strings and returns their value as a float.<\/p>\n<p><u>parseInt()<\/u>&#8211; Converts a string to an integer returning the first integer encountered which is contained in the string. If no integer value are found such as in the string &#8220;abcd&#8221;, then a value of 0 is returned.<\/p>\n<p><u>typeof<\/u> operator &#8211; This operator returns the type of the object it operates on. Values returned are string values and may be one of &#8220;undefined&#8221;, &#8220;object&#8221;, &#8220;function&#8221;, &#8220;number&#8221;, &#8220;Boolean&#8221;, or &#8220;string&#8221;.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Methods that belong to all objects<\/strong><\/p>\n<p><u>toString()<\/u> &#8211; Converts an object to a string. The syntax is shown below. Radix is the base value for the conversion, which may be 10 for decimal conversion. The value 1 is used for binary conversion, and 8 is used for octal conversion.<\/p>\n<p><strong>Dialog Boxes<\/strong><\/p>\n<p><u>alert(message)<\/u> &#8211; Displays an alert box with a message defined by the string message. Example:<\/p>\n<p><u>confirm(message)<\/u> &#8211; When called, it will display the message and two boxes. One box is &#8220;OK&#8221; and the other is &#8220;Cancel&#8221;.<\/p>\n<p><u>prompt(message)<\/u> &#8211; Displays a box with the message passed to the function displayed. The user can then enter text in the prompt field, and choose OK or Cancel. If the user chooses Cancel, a NULL value is returned. If the user chooses OK, the string value entered in the field is returned.<\/p>\n\n\n<p><a href=\"https:\/\/www.vskills.in\/certification\/tutorial\/dhtml-and-javascript-developer\/\" target=\"_blank\" rel=\"noreferrer noopener\">Back to Tutorial<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Javascript has many pre-defined functions and functions which are used extensively are Conversion and Comparison \u2013 Functions used for data conversion and comparison escape(string) &#8211; Encodes a string from ASCII into an ISO Latin-1 (ISO 8859-1) character set for HTML processing. It is passed the string to be encoded, and returns the encoded string. unescape&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[3352],"tags":[1467,2804],"class_list":["post-7595","page","type-page","status-publish","hentry","category-dhtml-and-javascript","tag-functions","tag-predefined-javascript-functions"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Predefined JavaScript functions - Tutorial<\/title>\n<meta name=\"description\" content=\"Predefined JavaScript functions. Govt of India Certification for DHTML and Javascript professionals. Get Certified and improve employability. Certification assesses candidates in DHTML.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Predefined JavaScript functions - Tutorial\" \/>\n<meta property=\"og:description\" content=\"Predefined JavaScript functions. Govt of India Certification for DHTML and Javascript professionals. Get Certified and improve employability. Certification assesses candidates in DHTML.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T08:47:06+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/\",\"name\":\"Predefined JavaScript functions - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"datePublished\":\"2013-01-28T12:06:17+00:00\",\"dateModified\":\"2024-04-12T08:47:06+00:00\",\"description\":\"Predefined JavaScript functions. Govt of India Certification for DHTML and Javascript professionals. Get Certified and improve employability. Certification assesses candidates in DHTML.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Predefined JavaScript functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Predefined JavaScript functions - Tutorial","description":"Predefined JavaScript functions. Govt of India Certification for DHTML and Javascript professionals. Get Certified and improve employability. Certification assesses candidates in DHTML.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/","og_locale":"en_US","og_type":"article","og_title":"Predefined JavaScript functions - Tutorial","og_description":"Predefined JavaScript functions. Govt of India Certification for DHTML and Javascript professionals. Get Certified and improve employability. Certification assesses candidates in DHTML.","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T08:47:06+00:00","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/","name":"Predefined JavaScript functions - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"datePublished":"2013-01-28T12:06:17+00:00","dateModified":"2024-04-12T08:47:06+00:00","description":"Predefined JavaScript functions. Govt of India Certification for DHTML and Javascript professionals. Get Certified and improve employability. Certification assesses candidates in DHTML.","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/predefined-javascript-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Predefined JavaScript functions"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/7595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=7595"}],"version-history":[{"count":6,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/7595\/revisions"}],"predecessor-version":[{"id":82888,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/7595\/revisions\/82888"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=7595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=7595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=7595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}