- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
what is the main difference between '=' and '==' operators in javascript?
The use of "=" operator is that it assigns value from right to left, whereas "==" shows whether the given values are equal or not.In the following example variables x and y were assigned values using "=" operator and their magnitudes were checked using "==" operator.
Example
<html> <body> <p id="equal"></p> <script> var x = 5; var y = "6"; document.write(x); document.getElementById("equal").innerHTML = (x == y); </script> </body> </html>
Output
false 5
- Related Articles
- Write the main difference between '==' and '===' operators in javascript?
- What is difference between '.' , '?' and '*' in Python regular expression?
- What is the difference between 'throw new Error' and 'throw someObject' in javascript?
- What is the difference between 'isset()' and '!empty()' in PHP?
- What is the difference between 'log' and 'symlog' in matplotlib?
- The difference between 'AND' and '&&' in MySQL?
- What is the difference between the 'COPY' and 'ADD' commands in a Dockerfile?
- What is the relation between 'null' and '0' in JavaScript?
- Difference between 'include' and 'extend' in Ruby
- Difference between 'struct' and 'typedef struct' in C++?
- Difference between 'struct' and 'typedef struct' in C++ program?
- What is the difference between 'except Exception as e' and 'except Exception, e' in Python?
- Finding the sum of two numbers without using '+', '-', '/', '*' in JavaScript
- What is the 'new' keyword in JavaScript?
- What is 'delete' Operator in JavaScript?

Advertisements