Home Page Icon
Home Page
Table of Contents for
A quick exercise
Close
A quick exercise
by Syed Omar Faruk Towaha
JavaScript Projects for Kids
JavaScript Projects for Kids
Table of Contents
JavaScript Projects for Kids
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Exploring JavaScript in the Console
Installing Google Chrome
Installing Atom
Chrome Developer Tools
Our first program
Why do we use Chrome Developer Tools?
Why do we use Atom as the text editor?
Exercise
Summary
2. Solving Problems Using JavaScript
Variables
Comments
Arithmetic operators
Addition
Subtraction
Multiplication
Division
Modulus
More operators and operations
Increment or decrement operators
Assignment operators
JavaScript comparison and logical operators
Summary
3. Introducing HTML and CSS
HTML
Your first webpage
More HTML tags
Coloring HTML text
Linking HTML text
Inserting an image
CSS
JavaScript on an HTML page
Summary
4. Diving a Bit Deeper
JavaScript methods
HTML buttons and form
Buttons
Form
If statement
Switch-case
Exercise
Loops
The for loop
Exercise
The while loop
Exercise
Summary
5. Ahoy! Sailing into Battle
The HTML part
The CSS part
The JavaScript part
The final code
Summary
6. Exploring the Benefits of jQuery
Installing jQuery
Explaining the code
Going deeper
The load() method
The keyup() and keydown() methods
The change() method
The blur() and focus() methods
The resize() method
The scroll() method
Summary
7. Introducing the Canvas
Implementing canvas
Adding JavaScript
Drawing a rectangle
Drawing a line
A quick exercise
Drawing a circle
Draw linear gradient
A quick exercise
Let's make a clock!
Summary
8. Building Rat-man!
Game user interface
Adding functionalities to the game
The app.main.js file
The app.display_functions.js file
The app.init.js file
Images for Rat-man!
The monsters folder
The player folder
The portal folder
The walls folder
Adding images to our cats
Draw the canvas
The app.key_handler.js file
The app.movement_functions.js file
The app.constants.js file
Playing the game
Summary
9. Tidying up Your Code Using OOP
Inheritance in JavaScript
Encapsulation in JavaScript
Dissecting Hangman
Summary
10. Possibilities
JavaScript as your first programming language
JavaScript is everywhere
JavaScript developer as profession
All chores can be done by JavaScript
Robotics
3D games
Making apps for your smartphones
Running web servers
Running Ruby and Python
Writing OS-independent desktop applications
Web scraping and screenshotting
Web analytics
Responsive and interactive contents
Animation
Creating cookies
Awesome JavaScript examples
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Draw linear gradient
Next
Next Chapter
Let's make a clock!
A quick exercise
Draw the following smiley face using HTML canvas. (
Hint
: you will have to draw three full circles and a half circle. The trick is that you can draw the figure by playing with the code of circle for the canvas.):
Draw a circle with a color gradient.
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset