Page 84 - DCAP202_Fundamentals of Web Programming
P. 84
Unit 6: Introduction to JavaScript
Data types: Data types specify what kind of data, such as numbers and characters, can be stored Notes
and manipulated within a program.
JavaScript: It is a scripting language designed primarily for adding interactivity to Web pages
and creating Web applications.
Live Script: Initially java script was called live script.
Null string: An empty set of quotes is called the null string.
SCRIPT tags: In Javascript, SCRIPT tags can be inserted into three places: in between the two
BODY tags, in between the two HEAD tags, and as a link to an external file, also in the HEAD
section.
String literals: They are rows of characters enclosed in either double or single quotes.
6.12 Review Questions
1. Why scripting languages are used?
2. Write the brief history about JavaScript.
3. What is the difference between Java and JavaScript?
4. Describe about the datatypes in JavaScript.
5. How JavaScript can be tagged with HTML?
6. Describe JavaScript Browsers compatibility.
7. Why JavaScript named as JavaScript?
8. Explain the Typecasting in JavaScript.
9. Describe the arrays in JavaScript.
10. How do you convert numbers between different bases in JavaScript?
11. What is the purpose of backslash in JavaScript?
Answers: Self Assessment
1. Mocha 2. LiveScript
3. JavaScript 4. web
5. dynamic 6. Server
7. SCRIPT 8. Elements
9. page content 10. <!—
11. Primitive 12. String literals
13. text input 14. Text area
15. Type casting 16. number(value)
17. array 18. ID
LOVELY PROFESSIONAL UNIVERSITY 77