Computer Science, asked by kishlay2627M, 9 months ago

what is javascript and what is its uses ? Is it is similar to Java programming ? WAP to call a function in javascript in inner Html. ​

Answers

Answered by avinashkumar288
1

Explanation:

que.1 what is javascript and what is its uses

ans.1JavaScript is a simple programming language with which web developers can write a script and create websites that are interactive. It was developed by Netscape but is now used by most web browsers. Since it is able to interact with HTML, it allows web developers to add dynamic elements within the web sites.

que.2s it is similar to Java programming ?

ans.2The JavaScript programming language is developed by Netscape, Inc and not part of the Java platform. Java applications are run in a virtual machine or web browser while JavaScript is run on a web browser. ... JavaScript is an OOP scripting language, whereas Java is an OOP programming language.

que.3WAP to call a function in javascript in inner Html.

ans.3JavaScript innerHTML. Summary: in this tutorial, you will learn how to use the JavaScript innerHTML property of an element to get or set an HTML markup contained in the element. The innerHTML is a property of the Element that allows you to get or set the HTML markup contained within the element.

Definition and Usage

The function statement declares a function.

A declared function is "saved for later use", and will be executed later, when it is invoked (called).

In JavaScript, functions are objects, and they have both properties and methods.

A function can also be defined using an expression (See Function Definitions).

Read our JavaScript Tutorial to learn all you need to know about functions. Start with the introduction chapter about JavaScript Functions and JavaScript Scope. For more detailed information, see our Function Section on Function Definitions, Parameters, Invocation and Closures.

Tip: Use the return statement to return a value from the function.

JavaScript function Statement

Example

Declare a function and output "Hello World" in an element with id="demo", when the function is called:

function myFunction() { // Declare a function

document.getElementById("demo").innerHTML = "Hello World!";

}

myFunction(); // Call the function

Syntax

function functionName(parameters) {

code to be executed

}

please mark me as brilliant answer

Similar questions