Skip to content

Arbdul13332/Java-Script-Class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

Java-Script-Class

what i've learned soo far on java script

CHAPTER ONE

introduction to javascript javascript is a dynamic and weakly typed interpreted programming language and compiled on runtime it is built to be executed in a browser with engine v8 (chrome) and and spidermonkey (firefox) which does the parsing and interpretation of code, javascript was later extracted and became node.js and can be executed on any machine, it can be used to build web backends and can interact with the operationg machine

Difference between Java and javascript

Java is OBJECT ORIENTED AND STRONGLY TYPED Javascript is flexible and weakly typed

OTHERS

we were thought how to follow the course and make use of the materials and participate in the assignments

CHAPTER 2

how to Add javascript

  1. <script src="fileLocation"></script>
  2. <script> alert("this is javascript") </script>

DECLARATION OF VARIABLES AND CONSTANT

variables are data containers whr the values can be changed variables are declared with the "LET" keyword, eg let userName = 'DAVE'

constant are also data containers where the vaules can'ts be changed constants are declared using the "const" keywords, eg const circle = 360

Functions

functions are reffered to as code on demand because the code doesnt get to run immediately, it runs when it is been called and it could be the first code but the last action on the app. it is defined with FOR DECLARATION: "function homeButtonClick(onclick){ alert("this is a fnction"); }" FOR CALLING A FUNCTION: functionName(parameters);

CODE STYLE AND SYNTAX

this section educates on writting a code that would be easy to read by someone else,by the appropriate use of whitespaces eg: WITHOUT WHITESPACE: function anExample(noWhiteSpace){ alert("didnt make use of whitespace")}

WITH WHITESPACE: function aExample(with whitespace) { alert("made use of whitespace") } SYNTAX when you make a mistake or forgot to add an component or a step while coding

RETURN KEYWORD: used to return a value and no action can be taken after the return keyword has been declared

parsing of a string to a number uisng the parseInt/ parseFloat keyword better still '+ +' can be used instead

About

what i've kearned soo far on java script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published