Saturday, February 15, 2020

Angular

**** JSON *****

  - JSON Stands for JavaScript Object Notation.

  - JSON Used to Transfer the Data Over the Network.

  - JSON is ligth weigth compared to XML.

  - JSON is the network friendly format.

  - Parsing of JSON Eazy Compared to XML.

Syntax.

1) Objects  -  { }

2) Arrays   -  [ ]

3) Data     - "key & value"

    - key & value separated by using ":"

    - eack key&value pairs separated by using ","


Ex_1:
create the json object with the following variable
@data

declare the following json keys
@sub_one
@sub_two
@sub_three

json values are
@Angular6
@NodeJS
@MongoDB


Ex_2:
create the arrow function with the folowing variable
@data

arrow function return json object.

json keys are

1) login
2) logout
3) setCredentials
4) clearCredentials

json values are arrow functions with string as return type.


Ex_3:
create the named function with the following name
@data


named function return json object.


json keys are
1) fun_one
2) fun_two
3) fun_three

json values are
1) fun_one definition
2) fun_two defintion
3) fun_three definition



Ex_4:
create the arrow function with the following variable
@calculator

arrow function return json object

json keys are
1) add
2) sub
3) mul
4) div

json values are "arrow function definitions with 2 arguments"













































































No comments:

Post a Comment