Powered by Blogger.

Friday 26 September 2014

javascript

By Unknown  |  02:26 No comments



1)      If someone disable the JavaScript then we can show message by adding tag
<noscript><h3>JavaScript is not enabled</he></noscript>
2)      JavaScript is case sensitive.
3)      Variable can be start by _,$,lower case and upper case
4)      There are 4 data types Number, string, Boolean, object
5)      You can convert string to number using Number(stringvalue)
6)      We can convert number to string string using String(numbervalue)
7)      Multiplication automatically convert string to number.

8)      parseInt function convert from decimal to integer
9)      Boolean(23) , Boolean(-3) will return true, Boolean(0) will return false. So anything other than zero will return true.
10)   We can create array in java script using Array



11)   Iterate in array

12)   We can use string in switch condition in javascript

13)   toFixed method fixed the number of digit after decimal

14) JSON stands for JavaScript Object Notation. It is lightweight format for creating objects that is part of and built into Javascipt. Json is part of javaScript and not a separate entity, it built into the raw javaScript programming langugae.
15) Json becoming a very popular data-interchange format, so much that is beginning to battle XML in popularity and usage.
16) Json data work as key/value pair
Var obj1 = {user:”John”,age=12};
17) Sample code
var obj1={user:"john",age:12};
var obj2={user:"kumar",age:72};
var obj3={user:"shambhu",age:92};
var obj4 = {u1:obj1,u2:obj2,u3:obj3}
document.write(obj4.u1.user);
We can update details here too i.e obj1.age=15
18) obj4.u1.user can be write as obj4["u1"].user or obj4["u1"]["user"]
19) It’s like array but open more possibility for data indexing and data handling. We can store object inside the object like point obj4 in below code. In json we can add Array, but in array we can’t store json
20) some sample


21)....




Author: Unknown

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

0 comments:

Recent Articles

© 2014 Learning Java. WP themonic converted by Bloggertheme9. Published By Gooyaabi Templates
TOP