0% found this document useful (0 votes)
6 views2 pages

JavaScript Syntax and Operators Guide

Uploaded by

moreh5638
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

JavaScript Syntax and Operators Guide

Uploaded by

moreh5638
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Deleting Properties

Delete keyword is used to delete both the value of the property itself.
delete person.age
delete person[“FirstName”];

Property Getters and Setters


Get-a function without argument, that works when a property is read.
Set-a function with one argument, that is called when the property is set.
Assignment No 1

1. State the use of dot syntax in JavaScript with the help of suitable example.
2. List and explain Logical operators in JavaScript.
3. List the comparison operators in Java script.
4. Write Java script to create person object with properties firstname, lastname,
age, eye color, delete eye color property and display remaining properties of
person object.
5. Explain getter and setter properties in Java script with suitable example.
6. Write a Java script program which computes, the average marks of the following
students then, this average is used to determine the corresponding grade.
Student Name Marks The grades are computed as follows:
Sumit 80 Rang Grade
Kalpesh 77 e
Amit 88 < 60 E
Tejas 93 < 70 D
Abhishek 65 < 80 C
< 90 B
< 100 A

You might also like