Javascript Articles

Page 197 of 534

Difference between Google Script (.GS) and JavaScript (.js)

Rushi Javiya
Rushi Javiya
Updated on 16-Jan-2023 8K+ Views

What is a .GS file? The computer language Google Apps Script is related to the file extension GS. This JavaScript-based application is used to execute automated activities across all Google apps designed for producing online Web-based applications, such as programs that send personalized emails, instantly prepare and load Google Docs files, and develop Web interfaces. GS files are implemented using Google Cloud and are made up of scripts written in Google Apps Script. These files are a foundation for an automated system that will help Google apps and other third-party software. The Verify Software Houses GemStone application, which can run ...

Read More

How is JavaScript less scoped than Java?

Rushi Javiya
Rushi Javiya
Updated on 16-Jan-2023 220 Views

Like Java and JavaScript, these two programming languages will inevitably compete against one another in the future. The name is the first step. As some extension to Java, JavaScript was destined to be forever confused and frequently confused with Java. Given that both Java and JavaScript have the word "Java" in their names, some people think they are connected. Although they have certain similarities, it is untrue since they differ in several ways. Java and JavaScript are used by programmers for various jobs; none is better. While Java is a general-purpose language, JavaScript may be used to create animated and ...

Read More

How to call a JavaScript function on a click event?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 06-Jan-2023 25K+ Views

To call a function on click event in JavaScript, you can use either the addEventListener method or the onclick event attribute. The addEventListener method is a general way to attach an event handler to a DOM element, and it allows you to specify the event and the callback function to be called when the event occurs. The onclick attribute is a specific event attribute that allows you to specify a JavaScript function to be called when the element is clicked. Both methods allow you to specify a function to be called when the element is clicked, but the addEventListener method ...

Read More

How to call jQuery function with JavaScript function?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 06-Jan-2023 17K+ Views

JavaScript is the core of any website, it adds functionalities to a website, make the overall website responsive. But in JavaScript, it is hard to select an element and add different functions like toggling an element, fade-in an element, and more. jQuery provides many methods for making it easy to add functionality to a website like fade-in, fade-out, hide, show, toggle, etc. Concatenating jQuery and JavaScript makes it easy to use the jQuery function in JavaScript function whenever needed, instead of calling them separately. Syntax To call a jQuery function with a JavaScript function, you can use the following syntax ...

Read More

How to calculate the nth root of a number in JavaScript?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 06-Jan-2023 1K+ Views

We have given a number and the task is to calculate the nth root of that number using JavaScript. We have multiple ways to achieve this, some of which are the following. Using Math.pow() Method Using Logarithm To get the nth root of a number firstly let’s understand whose root we can calculate and which number’s root we cannot calculate. If the number is positive and the root is also even then we will get two solutions. E.g − 2nd root of 16 is +4 and -4, similarly 4th root of 16 is +2 and -2 If ...

Read More

How to attach one or more drop-shadows to the box with JavaScript?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 06-Jan-2023 2K+ Views

To attach one or more drop shadows to a box with JavaScript, you can use the box-shadow style property. You can specify the shadow's offset, blur radius, spread radius, and color by passing values for these properties in the box-shadow property. Syntax Following is the syntax to add one or more drop shadows to the box with JavaScript − box.style.boxShadow = "offset-x offset-y blur-radius spread-radius color"; Here the box.style.boxShadow property in JavaScript allows you to add one or more drop shadows to a box element. It takes the following parameters offset-x − This is the horizontal offset of ...

Read More

How to access cookies using document object in JavaScript?

Saurabh Jaiswal
Saurabh Jaiswal
Updated on 06-Jan-2023 8K+ Views

With JavaScript, you can easily access/ read cookies with the “document.cookie” property. Reading a cookie is just as simple as writing one because of the value of the document.cookie object is the cookie. The document.cookie string will keep a list of name=value pairs separated by semicolons, where the name is the name of a cookie and value is its string value. In this article, we will learn how to access cookies using document object in JavaScript. Syntax document.cookie Return value − All the cookies are saved in the browser in a single string. The document.cookie string will keep ...

Read More

What is Unary Negation Operator (-) in JavaScript?

Abhishek
Abhishek
Updated on 06-Jan-2023 531 Views

The Unary Negation Operator first converts the operand into a number, and after that it negates. It operates on a single operand. It returns the negation of the operand. A boolean operand is converted to 0 or 1, and then negation is done. Similarly, a number with a base other than decimal is first converted to base 10, then the negation is computed. Syntax The following syntax will show you how you can use the unary negation operator to negate the value of a number − -x Here unary operator (-) negates x. Let us understand the application of ...

Read More

What is Subtraction Operator (-) in JavaScript?

Abhishek
Abhishek
Updated on 06-Jan-2023 2K+ Views

The subtraction operator is also known as the minus operator. It is a binary operator that means it requires at least two operands to operate on. It will not work with a single operand. Generally, the subtraction operator subtracts or minus the value of the second operand from the first operand and returns the result as it is, that means if the result of two numbers subtraction is negative it will return the negative result, else it will return positive result if that’s positive. In this article, we are going to discuss about the subtraction operator in details and its ...

Read More

Difference between Procedural and Declarative Knowledge

Kiran Kumar Panigrahi
Kiran Kumar Panigrahi
Updated on 05-Jan-2023 23K+ Views

We can express the knowledge in various forms to the inference engine in the computer system to solve the problems. There are two important representations of knowledge namely, procedural knowledge and declarative knowledge. The basic difference between procedural and declarative knowledge is that procedural knowledge gives the control information along with the knowledge, whereas declarative knowledge just provides the knowledge but not the control information to implement the knowledge. Read through this article to find out more about procedural knowledge and declarative knowledge and how they are different from each other. What is Procedural Knowledge? Procedural or imperative knowledge clarifies ...

Read More
Showing 1961–1970 of 5,338 articles
« Prev 1 195 196 197 198 199 534 Next »
Advertisements