javascript if statement and
const number = (Math.random() - 2.5) * 5;
if (number < 0) {
console.log('Number is negative');
}
if (number = 0) {
console.log('Number is zero');
}
if (number > 0) {
console.log('Number is positive');
}if (expression) {
Statement(s) to be executed if expression is true
} else {
Statement(s) to be executed if expression is false
}
let A = 1;
let B = 0;
if (A == 1 || B == 1){
// some code here
}if (A === B) && B === 1) {
// Code here
}let a = 1;
let b = 2;
if(a == 1 && b ==2){
// Code here
}HUH?
Also in JavaScript:
- onclick react history map
- dataset js
- jQuery change select value
- how to add functionality inside js object
- js console log input value
- each javascript
- javascript fill circle with color
- summernote mentions ajax
- javascript return value from async function
- p5js click on button
- find in js
- An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/package.json' Require stack:
- geojson longitude latitude order
- set padding jquery
- notify.js
- jspdf cdn
- javascript download file on click
- getaddrinfo EAI_AGAIN registry.npmjs.org docker
- node send file
- javascript check if set contains
- how to check no internet connection in jquery mobile phone
- base64 encode node js
- ORDS export jspon
- javascript round to nearest integer