If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: javascript-tutorial.com/operators/comparison-operators - Comparison operators - The com.

site address: javascript-tutorial.com/operators/comparison-operators/ redirected to: javascript-tutorial.com/operators/comparison-operators

site title: Comparison operators - The complete JavaScript Tutorial

Our opinion (on Thursday 19 November 2026 8:47:42 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:



Meta tags:

Headings (most frequently used words):

javascript, than, the, for, web, operators, equality, operator, inequality, greater, less, and, strict, objects, comparison, or, equal, to, summary, chapter, article, toc, about, getting, started, basics, control, structures, data, types, built, in, functions, classes, error, handling, regular, expressions, general, bom, dom,

Text of the page (most frequently used words):
the (54), #operator (25), and (21), you (21), javascript (20), #operators (19), equality (13), this (12), introduction (12), comparison (12), strict (12), for (12), let (11), alert (11), with (11), than (11), but (9), about (8), need (7), greater (7), assignment (6), will (6), match (6), equal (6), number (6), less (6), article (5), not (5), values (5), they (5), more (5), inequality (5), same (5), what (5), use (5), how (4), can (4), type (4), types (4), prompt (4), please (4), input (4), too (4), value (4), methods (4), functions (4), tutorial (3), into (3), language (3), here (3), arithmetic (3), programming (3), work (3), because (3), way (3), when (3), them (3), that (3), two (3), there (3), well (3), have (3), which (3), just (3), sometimes (3), know (3), whether (3), modify (3), example (3), using (3), statement (3), sign (3), web (3), object (3), regular (3), expressions (3), conditional (3), catching (3), your (2), next (2), comparing (2), most (2), now (2), another (2), strong (2), summary (2), sorry (2), else (2), changing (2), three (2), signs (2), exclamation (2), point (2), instead (2), are (2), therefore (2), performing (2), conversion (2), however (2), situations (2), even (2), simply (2), bit (2), chapter (2), data (2), things (2), make (2), string (2), above (2), all (2), between (2), low (2), high (2), comes (2), notice (2), negate (2), answer (2), line (2), difference (2), asp (2), net (2), dom (2), window (2), bom (2), search (2), error (2), errors (2), try (2), catch (2), fields (2), inheritance (2), getters (2), setters (2), prototypes (2), objects (2), function (2), parameters (2), optional (2), chaining (2), nullish (2), coalescing (2), ternary (2), remainder (2), logical (2), assign (2), increment (2), decrement (2), array (2), basics (2), loops (2), toc (2), localization, suggest, correction, contact, com, 2007, 2026, has, been, fully, translated, following, languages, preferred, list, help, translate, click, italian, czech, previous, essential, part, tasks, hopefully, understand, various, unsure, give, read, definitely, grasp, move, complicated, subjects, course, check, one, happens, actually, quite, simple, takes, quick, look, immediately, realizes, truly, any, background, come, from, typing, seem, odd, where, these, talked, time, revisit, subject, loose, dynamic, system, interpreter, behind, scenes, easier, instance, may, variable, basically, text, containing, teased, beginning, thing, did, strictness, why, smaller, couple, size, illustrate, changed, condition, wrong, should, ask, something, worries, mean, exact, opposite, first, then, visual, subtle, sure, learn, very, important, correct, start, compares, other, ones, result, boolean, either, true, false, often, combination, like, quickly, run, through, called, discussed, single, adding, secondary, completely, change, behavior, new, difficult, maneuver, get, used, fact, triple, deal, later, wpf, php5, jquery, html5, css3, webforms, mvc, location, history, script, tag, general, replace, capturing, groups, regex, flags, options, throwing, finally, handling, static, classes, extension, property, accessors, properties, multiple, return, recursive, callback, anonymous, default, json, math, date, built, null, undefined, strings, numbers, booleans, while, switch, control, structures, truthy, falsy, variables, basic, syntax, hello, world, tools, getting, started, libraries, webbrowser, table, contents, complete,


Text of the page (random words):
comparison operators the complete javascript tutorial javascript tutorial toc table of contents chapter article toc introduction the assignment operator comparison operators equality operator inequality operator greater than less than and greater less than or equal to and strict equality strict inequality summary arithmetic operators increment decrement operators modify and assign operators logical operators remainder operator conditional ternary operator nullish coalescing operator optional chaining operator about javascript what is javascript javascript and the webbrowser javascript libraries getting started the tools you need hello world the basics basic javascript syntax variables truthy falsy control structures the if statement the switch statement loops for and while loops for of and for in data types introduction booleans numbers strings null undefined type conversion built in objects introduction number string array the basics array methods date math json operators introduction the assignment operator comparison operators arithmetic operators increment decrement operators modify and assign operators logical operators remainder operator conditional ternary operator nullish coalescing operator optional chaining operator functions introduction function parameters function parameters with default values anonymous functions callback functions recursive functions multiple return values objects introduction properties methods property accessors getters setters prototypes prototypes inheritance extension classes introduction fields methods getters setters inheritance static fields methods error handling introduction catching errors try catch catching throwing errors try catch finally error types conditional catching regular expressions introduction regex flags options search match with regular expressions using capturing groups search replace with regular expressions javascript for web general introduction window dom bom the script tag javascript for web the bom the window object the history object the location object javascript for web the dom introduction javascript asp net mvc asp net webforms c css3 html5 jquery php5 wpf operators comparison operators we just discussed the assignment operator which is a single equality sign however by adding a secondary equality sign you completely change the behavior instead of an assignment you are now performing a comparison if you re new to programming this can sometimes be difficult to maneuver in but you have to get used to it in fact with javascript there s even a triple equality sign operator we have to deal with but more on that later let s quickly run through all the comparison operators to know what they re called and how they work equality operator we ll start with the equality operator which compares two values when using this comparison operator as well as most of the other ones the result is a boolean either the comparison is true or false therefore you will often use them in combination with an if statement like this let n1 prompt please input a number if n1 42 alert correct answer notice how we use the assignment operator on the first line and then the equality comparison operator on the next line the visual difference is subtle but make sure to learn the difference it s very important inequality operator but what if you need to ask whether something is not the same no worries you can negate the equality operator using an exclamation point to mean the exact opposite here s an example let n1 prompt please input a number if n1 42 alert wrong answer it should be 42 notice how i simply changed to to negate the condition greater than less than and sometimes you need to comparison not just about equality but about size for this javascript comes with greater than and less than operators they will let you know whether a value is greater than or less than another value let s illustrate this with an example let n1 prompt please input a number between 1 and 10 if n1 1 alert too low if n1 10 alert too high greater less than or equal to and sometimes you need to know whether a value is greater than or equal to a value or smaller javascript comes with a couple of operators for that as well let s modify the above example to use them let n1 prompt please input a number between 1 and 10 if n1 0 alert too low if n1 11 alert too high strict equality i teased a bit about this in the beginning of the article there s a more strict comparison operator to do the same thing as we just did above but in a more strict way but what is all this strictness about and why do we need it we talked a bit about this in the chapter about data types but it s time to revisit the subject because of the loose and dynamic type system in javascript the interpreter will do things behind the scenes to make things easier for you for instance you may have a variable which is basically a text string but containing a number so is 42 the same as 42 in javascript it is let n1 42 n2 42 if n1 n2 alert a match however if you come from a programming language with strong typing this will seem odd to you and there will be situations where you need to be more strict about types even in javascript as well for these situations simply use the strict equality operator by changing two equal signs to three let n1 42 n2 42 if n1 n2 alert a match else alert sorry no strict match what happens here is actually quite simple because we use the strict equality operator javascript is not performing any type conversion in the background when comparing the two values instead it takes a quick look at them and immediately realizes that they are not of the same type and therefore can t be truly equal strict inequality and of course you can check for strict inequality the same way by changing one of the three equal signs into an exclamation point let n1 42 n2 42 if n1 n2 alert sorry no strict match else alert a match summary comparing values is an essential part of most programming tasks and hopefully you now understand how the various comparison operators work in javascript if you re unsure give this article another read because you will definitely need a strong grasp of the way they work when you move on to more complicated subjects introduction the assignment operator previous arithmetic operators next this article has been fully translated into the following languages czech italian is your preferred language not on the list click here to help us translate this article into your language javascript tutorial com 2007 2026 contact us suggest correction localization
Thumbnail images (randomly selected): * Images may be subject to copyright.GREEN status (no comments)

    No Images


    Verified site has: 73 subpage(s). Do you want to verify them? Verify pages:

    1-5 6-10 11-15 16-20 21-25 26-30 31-35 36-40 41-45 46-50
    51-55 56-60 61-65 66-70 71-73


    Top 50 hastags from of all verified websites.

    Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

    Header

    HTTP/1.1 302 Redirect
    Content-Type text/html; charset=UTF-8
    Location htt????/javascript-tutorial.com/operators/comparison-operators/
    Server Microsoft-IIS/10.0
    X-Powered-By ASP.NET
    Date Thu, 19 Nov 2026 08:47:42 GMT
    Connection close
    Content-Length 186
    HTTP/2 200
    cache-control private
    content-type text/html; charset=utf-8
    server Microsoft-IIS/10.0
    set-cookie ASP.NET_SessionId=sp2y22c3ua3uxq1yetbtnrpo; path=/; HttpOnly; SameSite=Lax
    x-aspnetmvc-version 5.2
    x-aspnet-version 4.0.30319
    x-powered-by ASP.NET
    date Thu, 19 Nov 2026 08:47:42 GMT
    content-length 25759

    Meta Tags

    title="Comparison operators - The complete JavaScript Tutorial"
    name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"

    Load Info

    page size25759
    load time (s)0.246165
    redirect count1
    speed download104711
    server IP 142.132.248.53
    * all occurrences of the string "http://" have been changed to "htt???/"