how to compare two strings in javascript if condition
var string1 = "Hello World";
var string2 = "Hello world.";
if (string1 === string2) {
console.log("Matching strings!");
}
else {
console.log("Strings do not match");
}
Also in JavaScript:
- how to get the index of an array in javascript
- react check if browser is in dark mode
- Did you mean to use React.forwardRef()?
- javascript localStorage clear items
- sequelize get where
- update one component from another component angular 9
- js ask before close chrome
- jquery change picture source
- sorting array from highest to lowest javascript
- read xlsx file in angular 5
- node loop files and push to array to display on screen with nunjucks
- set localstorage
- open folder node js
- detect emoji in string javascript
- js reverse number
- oop js is
- crypto.randombytes(4).tostring('hex')
- algolia react hits
- javascript code checker
- quill js server side delta
- math.floor
- js json escape
- unable to add class in jsx
- google analytics nextjs