WWH JavaScript
Watch here with full example and with github: Watch Now
1. Question. What is JavaScript?
Answer:- Javascript is a scripting language. And it's basically used to make web pages more user-friendly and more interactive.
Few Important points related to javascript:-
- JavaScript is an untyped language.(What does it mean?)
- Unlike c/java or other programming languages, you don't need to define/declare type of variables
- JavaScript is an interpreted language.(Means?)
- Programs written in c/c+ or java, you need to compile first and after that, u can get output. but codes/programs written in javascript will give you output without compilation process.
2. Question. Why JavaScript?
Answer:- Javascript is basically used to make web pages more authentic. For example, you have a signup form of a user and there is a Pincode input box and you want to get the city on the input of pin code so you can add this functionality into your web page with the help of javascript.
Following points why you should use or learn Javascript:-
There’s a low threshold to get started(Means, if you don't know anything about c/c++/java programming then also you can start learning javascript)
it’s a fun language to learn
- Game development (best example is Facebook games)
3. Question. How to use javascript?
Answer:- There are 2 main important ways to use javascript in your application:-
- Create a javascript file and call it into your HTML page.
- Steps:-
- create a file and named it as test1.js
- write <script>alert("hello");</script>
- save it and save it with file extension .js
- now on your HTML page <script src="filename.js"></script>
- You can use the javascript feature in the same HTML page with help of script tag.
- Steps:-
- create a html file
- and before closing of body tag add <script>alert("hello");</script>
Comments
Post a Comment