Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

difference between single quotes and double quotes in javascript

/*
== in JavaScript is used for comparing two variables.
=== is used for comparing two variables, 
but this operator also checks datatype and compares two values
*/

0 == false   // true
0 === false  // false, because they are of a different type
1 == "1"     // true, automatic type conversion for value only
1 === "1"    // false, because they are of a different type
null == undefined // true
null === undefined // false
'0' == false // true
'0' === false // false
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript pad string left 
Javascript :: how to make an object in javascript 
Javascript :: Example React Hook 
Javascript :: json object array 
Javascript :: array.sort 
Javascript :: javascript even number 
Javascript :: string immutable javascript 
Javascript :: how to make a function in javascript 
Javascript :: stringy 
Javascript :: change icon on click angular 
Javascript :: add options to select box dynamically jquery 
Javascript :: reactjs 
Javascript :: query selector element with class and parent class 
Javascript :: how to install react js 
Javascript :: javascript image preview before upload 
Javascript :: send request express 
Javascript :: how to select last element in a array 
Javascript :: when to use previous state in useState 
Javascript :: react createelement 
Javascript :: react props change 
Javascript :: vanilla tilt js 
Javascript :: object initializer in javascript 
Javascript :: tinymce react 
Javascript :: google js console 
Javascript :: javascript json to string print 
Javascript :: method function difference 
Javascript :: chrome-aws-lambda 
Javascript :: createtextnode javascript 
Javascript :: modules.exports javascript 
Javascript :: serviceworker in angular 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =