javascript declare a variable
//choose the best for your solution
var myVariable = 22; //this can be a string or number. var is globally defined
let myVariable = 22; //this can be a string or number. let is block scoped
const myVariable = 22; //this can be a string or number. const is block scoped and can't be reassignedvar variable1 = "some variable content";// write what ever you want
// one way is
// this is to declare intigers
var a = 10;
//this is to declare strings aka words
var b = "hi";
// the key word var can be replaced by let
//like this
let a = 10;
let b = "hi";
// i recomend using let insted of var
Also in JavaScript:
- start peerjs server
- latest rn fatch blob package download
- javascript get last element of array pull
- css div at bottom of div
- js check if string contains character
- how to use cordova screen shot
- import React, { memo } from 'react';
- json decode android
- fade in onscroll jquery
- core.js:13987 'mat-date-range-input' is not a known element
- header in axios
- javscript append item from array
- regular expression start and end with same character javascript
- react cloud foundry nginx 404
- remove a class after 100 milliseconds jquery
- local storage javascript array
- >Error: Unknown require: ./New ES6 Class Features (in module /App.js) (/App.js:2)
- object to query string javascript
- leaflet change marker location
- referenceerror document is not defined node js
- javascript link to google maps route
- webpack react proxy not working
- jquery ajax promise
- how to add objects in array in javascript