The document discusses keywords used in JavaScript including prompt, parseInt, document.write, and alert. It provides examples of code using these keywords to calculate the perimeter of a square and multiply a user-input number by 20. The keywords need to be filled in the code snippets to make the programs work.
2. Prompt, A prompt box is often used if you want the user to input a
value before entering a page.
ParseInt, this changes anything we enter into a program into
numeric data/numbers. We mostly use this keyword for
mathematical programs.
Document.write, this keyword will create a sentence that we
want the program to show to the user.
Alert, An alert box is often used if you want to make sure
information comes through to the user.
3. FILL IN THE BLANKS,
LOOKING AT THE FOLLOWING CODE AND INPUT THE FOLLOWING
KEYWORDS TO MAKE PROGRAM WORK-
PROMPT , PARSEINT, DOCUMENT.WRITE
Finding the perimeter of a square
<html>
<body>
<script type=text/javascript>
Var side = _____(enter the sides of the square,);
Side=______(side);
Var perimeter= 4*side;
___________(the perimeter of the square is:, perimeter);
</script>
</body>
</html>
4. FILL IN THE BLANKS,
LOOKING AT THE FOLLOWING CODE AND INPUT THE FOLLOWING
KEYWORDS TO MAKE PROGRAM WORK-
PROMPT , PARSEINT, ALERT
<html>
<body>
<script>
var number= ______("enter a number");
number=______(number * 20);
_____(number);
</script>
</body>
</html>