Javascript 1

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Javascript 1 as PDF for free.

More details

  • Words: 261
  • Pages: 7
CS114

INTRODUCTION TO JAVASCRIPT

1.0

5-1

Introduction to JavaScript •

Is a scripting language



Interpreted from within a browser.



Available in two formats : client-side JavaScript and serverside JavaScript.



It is an object-based language that comes with many built-in objects.



Is platform-independent as long as the browser is JavaScript-enabled.



Is designed to extend the capabilities of the Web application to provide user interactivity.

INTRODUCTION TO JAVASCRIPT

2.0

CS114

Keywords in JavaScript

3.0 Rules to follow when naming variables :

5-2

CS114

INTRODUCTION TO JAVASCRIPT



The name must begin with a letter or an underscore.



The rest of the name is made up of letters, numbers, or underscores.



Do not use the reserved words in JavaScript.



Avoid placing any spaces or punctuation in the name.

VALID

INVALID

mynumber

my number

student_no

student.no

male

*male

year2001

4.0

(period) (must start with a number) (must start with a number)

Operators in JavaScript

symbol = + * / % ++ -== != > < >= <= && ||

5.0

2001

(space)

description Assign values Addition Subtraction Multiplication Division Modulus returns the remainder Increments by one Decrements by one equals not equal to greater than less than greater than or equal to less than or equal to logical AND logical OR

Hello World Program

5-3

INTRODUCTION TO JAVASCRIPT

CS114

6.0 Window Alert

7.0 Window Prompt

5-4

CS114

INTRODUCTION TO JAVASCRIPT

8.0

Sample Codes 1

9.0

Sample Codes 2

5-5

INTRODUCTION TO JAVASCRIPT

10.0

Sample Codes 3

11.0

Sample Codes 4

CS114

5-6

CS114

INTRODUCTION TO JAVASCRIPT

5-7

Related Documents

Javascript 1
November 2019 5
Javascript 1
April 2020 2
Javascript
November 2019 51
Javascript
June 2020 24
Javascript
November 2019 43
Javascript
June 2020 24