Auto-generate Flow Chart from Java/C++ Codes:

Raptor Flowchart Tutorial For Beginners

Thursday, December 13, 2012

Simple Way To Learn JavaScript

Cara Mudah Belajar JavaScript

Terkini: Saya telah menulis semula tutorial dalam bahasa Melayu Cara Mudah Belajar JavaScript.


Notes On Introduction To JavaScript
by www.NotaRazi.com








Introduction

JavaScript (sometimes abbreviated JS) is a scripting language commonly implemented as part of a web browser in order to create enhanced user interfaces and dynamic websites.

JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It uses syntax influenced by the language C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics.

JavaScript's use in applications outside web pages — for example in PDF documents, site-specific browsers, and desktop widgets—is also significant. Newer and faster JavaScript VMs and frameworks built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web applications.

1.Generic Approach To Learn Programming

1.1.Control Flow Structure

1.1.1.Sequential (turutan)
pseudo-code
BEGIN
PRINT “Hello World”
END

output
Hello World



 1.1.2.Selection (pilihan)
pseudo-code
BEGIN
READ pin
IF pin=1234
PRINT “correct”
ELSE
PRINT “wrong”
ENDIF
END

output IF
1234
“correct”

output ELSE
5678
“wrong”





1.1.3.Loop (gelung)
pseudo-code
BEGIN
FOR a: 1 TO 10
PRINT a + “**********”
ENDFOR
END

output
1**********
2**********
3**********
4**********
5**********
6**********
7**********
8**********
9**********
10**********


1.2. Basic Code Module Structure

pseudo-code
MAIN MODULE BEGIN
Action1
Action2
Call Module1
Action3
END MAIN MODULE

MODULE1 BEGIN
Action1
Action2
Return Value
END MODULE 1





1.3. Code Syntax


1.3.1.Basic Code Structure

1.3.2.Reserved Keywords

1.3.3.Data Containers

1.3.4.Data Operators


pseudo-code
READ Y,Z //y=2, z=3
LET X= 3 * Y - (2+Z)
PRINT X

output
1

explanation
RESERVED KEYWORDS
DATA CONTAINERS
DATA OPERATORS
DATA


Read Full Content

No comments: