Browsed by
Tag: Learn Javascript

Javascript Operators

Javascript Operators

JavaScript operators are used to assign values, compare values, perform arithmetic operations, and more. There are different types of operators for different uses. Here’s a list of JavaScript operators and a brief description of them. Arithmetic Operators Arithmetic operators are used to do math operations / calculations on numbers Operator Description + Addition – Subtraction * Multiplication / Division % Remainder of a division (10 % 3 = 1)10 can be devided by three, three times and 1 is what…

Read More Read More

JavaScript Variables

JavaScript Variables

A variable is basically a container or place holder for storing data values. Variables are fundamental to all programming languages. Variables are used to store data, like a string of text, numbers, etc. The data or value stored in the variables can be set, updated, and retrieved whenever needed. In general, variables are symbolic names for values.  Declare JavaScript Variables You can create/ declare a variable using the  var  keyword Like this In this example,  myName, age and job are…

Read More Read More

JavaScript Comments

JavaScript Comments

Not all JavaScript statements are “executed”. Comments are lines of code that JavaScript will intentionally ignore. Commenting is a way that you can: Leave no to other developers. Describe what your code does. Leave notes to yourself for the future. Comment out a part of the Javascript code without deleting it. There are two ways to write comments in JavaScript: Single-line Comment Multi-line Comment Single Line Comments Single line comments start with  // ( two forward slashes).Anything you write after…

Read More Read More

JavaScript Output

JavaScript Output

JavaScript can display data in different ways. There are certain situations in which you may need to generate output from your JavaScript code  For example, you might want to see the value of a variable, test your code, get input from the user and so on. JavaScript Display Possibilities Using:  innerHTML. document.write(). window.alert(). console.log(). Using innerHTML To access an HTML element, JavaScript can use the document.getElementById(id) method. The id attribute defines the HTML element. The innerHTML property defines the HTML content. As demonstrated in the following…

Read More Read More

JavaScript Tutorial

JavaScript Tutorial

JavaScript is the most popular client-side programming language What is Javascript? Javascript is a programming language. Sometimes you may hear as a scripting language. İt has a lot of uses but in these tutorials we are going to focus on how to use Javascript to add interactivity to web pages. JavaScript is the most popular and widely used client-side scripting language. Client-side scripting refers to scripts that run within your web browser. This tutorial will teach you JavaScript from basic…

Read More Read More

error

Let's make it official :) Subscribe to my Youtube Channel.