Front-End JavaScript Basics Summary (1) JS composition and data type

Source: Internet
Author: User

In the daily work in the use of the native JS very little, feel that they have been the original JS forgotten, here to start summing up the next JS, from the basis of the beginning of it!!! The composition of javascript: 1, ECMAScript: Interpreter, translator. Personal understanding is the Analytic programming language. 2, Dom:document Object Model. Action page element 3, Bom:browser Object moder. Manipulate the data type of the browser javascript: JavaScript uses typeof to determine the data type. The data types returned with typeof have the following common undefined: 1, no declaration in two cases. 2, declared but not assigned. Number string Boolean function object instance:
<script>
var a=12;
Alert (typeof a); Number
A= ' abc ';
Alert (typeof a); String
A=true;
Alert (typeof a); Boolean Boolean
/*window.onload=function ()
{
A=document.getelementbyid (' Div1 ');
Alert (typeof a); Object
};*/
A=function ()
{
Alert (' abc ');
};
Alert (typeof a); function
var b;
Alert (typeof B); Undefined
/*
Undefined 1. You really don't have a definition. 2. Although defined, but not given a value
*/
</script>

Front-End JavaScript Basics Summary (1) JS composition and data type

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.