Master JavaScript and JQuery - SkillBakery Studios

Breaking

Post Top Ad

Post Top Ad

Tuesday, June 2, 2020

Master JavaScript and JQuery


Master JavaScript and JQuery



Welcome to the most powerful amazing and always in demand programming language everyone should know in order to become a good web developer. This blog post will help you learn and master javascript and Jquery.

What is Javascript?

JavaScript is a high-level language and is integrated with java.JavaScript is very easy to implement because it is integrated with HTML. It’s a programming language used on both client-side and server-side that allows you to develop web pages interactively. JavaScript improves the user experience of the static web page into an interactive one.

How to start code in Javascript
To code in javascript, let's start with the basics, variables and data types
What are the variables?
In a simple line, we say variables works as a container of data types

For e.g      
               

stores the value 1, b stores the value 2, c stores the value 2+1=3

JavaScript Numbers – It has only one type of numbers, this can be written with or without decimals.

For e.g.  

             
Numbers are stored as precise floating-point numbers. Maximum number of the decimal is 17

Javascript Objects – given example assigns simple values  to a variable name student 

For e.g. 

         


Javascript Strings – strings basically stores text, strings are written inside quotes.we can use single & double-quotes.

For e.g.

           

Javascript Arrays – Arrays are used to store multiple values in a single variable.

For e.g.

            
Javascript Functions- functions are the set of code to perform particular task.

For e.g.

         

    This function will return the addition of a1 and a2

Till now we learned all the basics to write a code in JavaScript

Let’s Begin writing our first Javascript Code


Output: 


    
Now comes JQuery

What is JQuery?

Jquery is a javascript library that simplifies JavaScript programming and it’s easy to learn. It makes things like HTML event handling, animation, and AJAX much simpler with easy use of API across all browsers.
In JQuery, you can hide and show HTML elements with hide () and show () methods.

        



 JQuery Sliding- With JQuery we can create sliding effects on HTML elements.

              

JQuery Animation-is used to give your page an animation.

           


JQuery Manipulating CSS used to manipulate is CSS to change the look and feel.

            
Comparative study between Javascript and jQuery

Comparision
Javascript
JQuery
Definition
It is a programming language
It is an API

Language
It is an interpreted language
It uses resources are given by javascript
Simple and Easy
We need to write our own scripting language
It uses already written script
Code length
We have to write more lines of code
Fewer lines of code is written
Syntax
We can write JavaScript code within the script tag in HTML as described earlier.
$ – a sign to define
JQuery.
Selector – query to find
HTML elements.
action – JQuery action to be performed.
Where to write the code
JavaScript code must be written inside <script> and </script> tag within an HTML. we don’t need to import/add any libraries to run JavaScript code.
JQuery code also have to be inserted inside <script> and </script>
tags inside HTML.
We have to insert/import the JQuery libraries to run the code inside <script> and </script>.                                              
JQuery libraries can be imported by
1) Download the libraries from jQuery.com
2) Include libraries from CDN (content delivery network.)


Now as we know the difference in JavaScript and jquery, let’s watch the below video to know in detail…





  

No comments:

Post a Comment

Post Top Ad