Data Types (types of information) are used to determine the type of data values ​​to variables. To match the reference data variables to use are as follows. 

-number refers to the figure contains an integer data type (Integer) and a real number (Floating). 

for example,

var x=34.50;
var y=34;

Example:

<html>
<body>
<script>
var x=34.50;
var y=34;
document.write(x + "<br>")
document.write(y + "<br>")
</script>
</body>
</html>

This is the result:

 

-boolean or logical data refers to the two logical states which is true (True) and false (False). 

for example, 

var x = true; 
var y = false; 

 

-string refers to text data. Which will be defined in quotation marks ("..."). 

for example, 

var name = "Harry Potter"; 
var age = "age 23 years";

Example:

<html>
<body>
<script>
var name1="Batman";
var name2="Superman";
var name3="Spiderman";
document.write(name1 + "<br>")
document.write(name2 + "<br>")
document.write(name3 + "<br>")
</script>
</body>
</html>

This is the result:

 

 -null means no data values ​​for any null-terminated value of the variable storage space out of memory. 

for example, 

cars = null; 
person = null; 

 

-Array is multiple data comes sequentially. 

for example, 

var cars = new Array (); 
cars [0] = "Toyota"; 
cars [1] = "Honda"; 
cars [2] = "BMW";

Example:

<html>
<body>
<script>
var i;
var cars = new Array();
cars[0] = "Toyota";
cars[1] = "Honda";
cars[2] = "BMW";
for (i=0;i<cars.length;i++)
{
document.write(cars[i] + "<br>");
}
</script>
</body>
</html>

This is the result:

 

 

Next

 

Recent Topics
Subject
Post Reply
Open
Recent
介绍 模块 MooZiiCart Search 用关键词帮产品搜索按照设置。
By alfie8522 Wed 08 Jun 2022 12:56 pm Board Chinese Language - 简体中文
0
1347
Wed 08 Jun 2022 12:56 pm By alfie8522 View Topic 介绍 模块 MooZiiCart Search 用关键词帮产品搜索按照设置。
介绍 Plugin Search MDFiles 搜索产品信息通过 com_search。
By alfie8522 Mon 06 Jun 2022 1:23 pm Board Chinese Language - 简体中文
2
426
Tue 07 Jun 2022 11:57 am By alfie8522 View Topic 介绍 Plugin Search MDFiles  搜索产品信息通过 com_search。
Whats the best sidebar menu extension/module for J4 ?
By mati123 Sat 04 Jun 2022 8:11 pm Board English Language
0
635
Sat 04 Jun 2022 8:11 pm By mati123 View Topic Whats the best sidebar menu extension/module for J4 ?
介绍 Plugin System MRestore 对于想要恢复系统的网站 ,为了恢复其他信息。
By alfie8522 Sat 04 Jun 2022 1:13 pm Board Chinese Language - 简体中文
0
486
Sat 04 Jun 2022 1:13 pm By alfie8522 View Topic 介绍 Plugin System MRestore 对于想要恢复系统的网站 ,为了恢复其他信息。
Joomla Error - php_network_getaddresses: getaddrinfo failed
By Skyzhay Mon 16 May 2022 3:13 pm Board English Language
1
1455
Mon 16 May 2022 4:26 pm By mindphp View Topic Joomla Error - php_network_getaddresses: getaddrinfo failed
upgrade Joomla 3.10.8 to Joomla 4.1 Database Problems
By ghdfkjg Wed 11 May 2022 3:29 pm Board English Language
0
979
Wed 11 May 2022 3:29 pm By ghdfkjg View Topic upgrade Joomla 3.10.8 to Joomla 4.1 Database Problems
New Joomla Installation of 4.1 Results in 500 Error
By ghdfkjg Wed 11 May 2022 3:00 pm Board English Language
0
1205
Wed 11 May 2022 3:00 pm By ghdfkjg View Topic New Joomla Installation of 4.1 Results in 500 Error
Learn how to create a gmail account
By tomcopper987 Tue 10 May 2022 5:17 pm Board English Language
1
1768
Wed 08 Feb 2023 11:50 pm By Anonymous View Topic Learn how to create a gmail account
显示网上商店的统计,通过MooZiiCart 的 模块 Statistics 。
By alfie8522 Tue 10 May 2022 1:22 pm Board Chinese Language - 简体中文
0
512
Tue 10 May 2022 1:22 pm By alfie8522 View Topic 显示网上商店的统计,通过MooZiiCart 的 模块 Statistics 。
介绍 plg system mzc fulfillment - 添加 mooziicart 的 fulfillment系统。
By alfie8522 Mon 09 May 2022 3:15 pm Board Chinese Language - 简体中文
0
450
Mon 09 May 2022 3:15 pm By alfie8522 View Topic 介绍 plg system mzc fulfillment - 添加 mooziicart 的 fulfillment系统。
介绍 com_mdmzcbridgeerp 对于Mooziicart 和 ERP 之间,数据连接。
By alfie8522 Tue 03 May 2022 4:46 pm Board Chinese Language - 简体中文
0
563
Tue 03 May 2022 4:46 pm By alfie8522 View Topic 介绍 com_mdmzcbridgeerp 对于Mooziicart 和 ERP 之间,数据连接。
介绍插件 MZC reCaptcha 对于增加MooZiiCart 1.0.0的 reCaptcha以各种形式。
By alfie8522 Sat 30 Apr 2022 12:53 pm Board Chinese Language - 简体中文
0
416
Sat 30 Apr 2022 12:53 pm By alfie8522 View Topic 介绍插件 MZC reCaptcha 对于增加MooZiiCart 1.0.0的 reCaptcha以各种形式。
介绍 QuickStart MooZiiCart- MegaDeal 是一个帮助安装MooZiiCart套餐 Joomla + MooZiiCart 通过 Template MegaDeal 1.0.12
By alfie8522 Fri 29 Apr 2022 2:27 pm Board Chinese Language - 简体中文
0
854
Fri 29 Apr 2022 2:27 pm By alfie8522 View Topic 介绍 QuickStart MooZiiCart- MegaDeal 是一个帮助安装MooZiiCart套餐 Joomla + MooZiiCart 通过 Template MegaDeal 1.0.12
What ecommerce module for free in joomla
By azael123 Thu 28 Apr 2022 8:03 pm Board English Language
1
914
Fri 06 May 2022 10:30 am By pyspt012 View Topic What ecommerce module for free in joomla
介绍QuickStart MooZiiCart- Protostar 是一个帮助安装MooZiiCart套餐 Joomla + MooZiiCart 通过 Template Protostar 1.0.9
By alfie8522 Thu 28 Apr 2022 12:20 pm Board Chinese Language - 简体中文
0
635
Thu 28 Apr 2022 12:20 pm By alfie8522 View Topic 介绍QuickStart MooZiiCart- Protostar 是一个帮助安装MooZiiCart套餐  Joomla + MooZiiCart 通过 Template Protostar 1.0.9
介绍QuickStart MooZiiCart - Herix 是一个帮助安装MooZiiCart套餐 Joomla + MooZiiCart 通过 Template Herix 1.0.10
By alfie8522 Wed 27 Apr 2022 5:39 pm Board Chinese Language - 简体中文
0
584
Wed 27 Apr 2022 5:39 pm By alfie8522 View Topic 介绍QuickStart MooZiiCart - Herix 是一个帮助安装MooZiiCart套餐 Joomla + MooZiiCart 通过 Template Herix 1.0.10
介绍了模板 MooZii Opencart - Template MooZiicart ,自己建一个漂亮的网站。
By alfie8522 Tue 26 Apr 2022 1:33 pm Board Chinese Language - 简体中文
0
816
Tue 26 Apr 2022 1:33 pm By alfie8522 View Topic 介绍了模板 MooZii Opencart  - Template MooZiicart ,自己建一个漂亮的网站。
介绍 Plugin System MZC bridgeorders 1.0.1 - 同步信息发送订单去 ERP ,在站点上订购时 。
By alfie8522 Mon 25 Apr 2022 4:30 pm Board Chinese Language - 简体中文
0
445
Mon 25 Apr 2022 4:30 pm By alfie8522 View Topic 介绍 Plugin System MZC bridgeorders 1.0.1 - 同步信息发送订单去 ERP ,在站点上订购时 。
Introducing Plugin MooZiiCart Search - add search result to com_search for product information
By pyspt012 Sat 23 Apr 2022 4:03 pm Board English Language
0
2377
Sat 23 Apr 2022 4:03 pm By pyspt012 View Topic Introducing Plugin MooZiiCart Search - add search result to com_search for product information
Introducing Module MooZiiCart Recent Comment - displays the latest comment
By pyspt012 Sat 23 Apr 2022 3:52 pm Board English Language
0
802
Sat 23 Apr 2022 3:52 pm By pyspt012 View Topic Introducing Module MooZiiCart Recent Comment - displays the latest comment