JS workshop

Ayush Garg
2 min readJun 14, 2021

The role of the browser other than accessing the website is that it easily interprets the code any any language like java, html etc.

Event in browser are the activities done by the user while interacting with the webpages for example: clicking, selecting etc.

The various ways to include JavaScript in our HTML code are Inline Code, Embeded Code and External JS file.

The syntax of print statement in JavaScript is <script>document.write(“Hii..!!”);</script>

A JavaScript framework is a collection of JavaScript code libraries that provide developers with pre-written code for routine programming tasks.

We can run JavaScript code directly in browser as javascript: js_code

E.g. javascript : alert(“ALERT”);

The role of div tag is division tag. The div tag is used in HTML to make divisions of content in the web page like text, images, etc.

The use of getElementById() function is used to select a element using its id name & innerHTML keyword is used to get the content of the html element.

Learnt use of onclick, mouseover, mouseover event.

We can import various libraries that support text to speech processing. E.g. SpeechSynthesisUtterance

DOM is Document Object Model.

There are some types of boxes which I have learnt in this workshop

Alert, prompt, confirm

BOM: Box Object management

All the object in the url we can manage

There is a keyword called style in JavaScript by using that we can almost use all the things of css in JavaScript.

AJAX: Asynchronous Javascript and XML the request is sensed in Asynchronous way

Ex: we can send the data serially and parallely.

There are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server.

We can function called XMLHttpRequest();

Synchronous code is executed in sequence — each statement waits for the previous statement to finish before executing. Asynchronous code doesn’t have to wait — your program can continue to run. You do this to keep your site or app responsive, reducing waiting time for the user.

A common use of JSON is to exchange data to/from a web servers

When receiving data from a web server, the data is always a string.

Parse the data with JSON.parse(), and the data becomes a JavaScript object.

--

--