Course
What is JavaScript?-- operator-= operator++ operator+= operatorAccessing and setting contentArray concat() methodArray indexOf()Array lengthArray pop()Array shiftArraysBooleansBracesCallback functionCalling the functionClassClosureCode blockCommentConditionsConsoleConstructorCreating a p elementData typesDate getTime()DestructuringElseElse ifEnumEquals operatorError HandlingES6Event loopEventsExtendFetch APIFilterFor loopforEach()FunctionFunction bind()Function nameGreater thanHead elementHoistingIf statementincludes()Infinity propertyIteratorJSONLess thanLocal storageMapMethodsModuleNumbersObject.keys()Overriding methodsParametersPromisesRandomReduceRegular expressionsRemoving an elementReplaceScopeSession storageSortSpliceStringString concat()String indexOf()SubstringSwitch statementTemplate literalsTernary operatorTileType conversionWhile loop
-= operator in JavaScript
To subtract from a variable’s value, we use the -=
operator, like here where we decrease likes
by 3
.
jsx
let likes = 5;
likes -= 3;
console.log(likes);