JavaScript Tutorials
26.9K subscribers
5 links
This channel will serve you all the codes and programs of JS language
Download Telegram
Channel created
✴️Learn JavaScript Tutorial


Our JavaScript Tutorial Is designed for beginners and professionals both. JavaScript is used to create client-side dynamic pages.

JavaScript is an object-based scripting language which is lightweight and cross-platform.

JavaScript is not a compiled language, but it is a translated language. The JavaScript Translator (embedded in the browser) is responsible for translating the JavaScript code for the web browser.
✴️Application of JavaScript


JavaScript is used to create interactive websites. It is mainly used for:

Client-side validation,

Dynamic drop-down menus,

Displaying date and time,

Displaying pop-up windows and dialog boxes (like an alert dialog box, confirm dialog box and prompt dialog box),

Displaying clocks etc.
1. Program to print hello world

<html>
<body>
<script type="text/javascript">
document.write("hello World");
</script>
</body>
</html>
JavaScript Tutorials:
2. 2. Program to swap two strings.

<html>
<head>
<script> function swap()
{

var txt = document.getElementById('t1').value;
document.getElementById('t1').value = document.getElementById('t2').value; document.getElementById('t2').value = txt;

}

</script>
</head>
<body>

<input type="text" id="t1"> <input type="text" id="t2">
<br>
<input type="button" value="Swap" onclick="swap()">

</body>
</html>