JavaScript Projects for Kids
eBook - ePub

JavaScript Projects for Kids

  1. 188 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

JavaScript Projects for Kids

About this book

Gear up for a roller-coaster ride into the world of JavaScript and programming with this easy-to-follow, fun, and entertaining project-based guide

About This Book

  • Get to know the concepts of HTML and CSS to work with JavaScript
  • Explore the concepts of object-oriented programming
  • Follow this step-by-step guide on the fundamentals of JavaScript programming

Who This Book Is For

If you've never written code before or you are completely new to the world of web programming, then this book is the right choice for you. This book is for kids of age 10 years and above and parents who are completely new to the world of programming and want to get introduced to programming.

What You Will Learn

  • Learn how to work with Google Developer tools to iterate, debug and profile your code
  • Develop a Battleship game using the basic concepts of HTML and CSS
  • Get to know the fundamentals of JavaScript programming
  • Create our own version of Pac Man game.
  • Discover the vital concepts of object-oriented programming

In Detail

JavaScript is the most widely-used programming language for web development and that's not all! It has evolved over the years and is now being implemented in an array of environments from websites to robotics. Learning JavaScript will help you see the broader picture of web development.

This book will take your imagination to new heights by teaching you how to work with JavaScript from scratch. It will introduce you to HTML and CSS to enhance the appearance of your applications. You'll then use your skills to build on a cool Battleship game! From there, the book will introduce you to jQuery and show you how you can manipulate the DOM. You'll get to play with some cool stuff using Canvas and will learn how to make use of Canvas to build a game on the lines of Pacman, only a whole lot cooler! Finally, it will show you a few tricks with OOP to make your code clean and will end with a few road maps on areas you can explore further.

Style and approach

This is an easy-to-follow, informative, and fun guide that takes a project-based approach to teaching programming in JavaScript. You will learn everything you need to get started with serious web application development.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

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

JavaScript Projects for Kids

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2016
Production reference: 1220116
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-717-6
www.packtpub.com

Credits

Author
Syed Omar Faruk Towaha
Reviewer
Johnathan Iannotti
Commissioning Editor
Veena Pagare
Acquisition Editor
Aaron Lazar
Content Development Editor
Sachin Karnani
Technical Editor
Manthan Raja
Copy Editor
Vibha Shukla
Project Coordinator
Nikhil Nair
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Disha Haria
Jason Monteiro
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Author

Syed Omar Faruk Towaha has degrees in physics and computer engineering. He is a technologist, tech speaker, and physics lover from Shahjalal University of Science and Technology (SUST), Sylhet. He has a passion for programming, tech writing, and physics experiments.
His recent books include Easy Circuits for Kids, Fundamentals of Ruby, and How You Should Design Algorithms. He i...

Table of contents

  1. JavaScript Projects for Kids

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access JavaScript Projects for Kids by Syed Omar Faruk Towaha in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in JavaScript. We have over one million books available in our catalogue for you to explore.