Skip to content

asifurrahman01714/RandomJsProblemSolving

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Right:

let value = 0;
function startTime() {
  value++;
  document.getElementById("demo").innerHTML = value;
  setTimeout(startTime, 1000);
}

Wrong:

function startTime() {
  setTimeout(startTime(), 1000);
}

Right:

let value = 0;
function startTime() {
  value++;
  document.getElementById("demo").innerHTML = value;
  setTimeout(function(){startTime()}, 1000);
}

You cannot re-declare a variable declared with let or const.

This will not work:

let carName = "Volvo";
let carName;

All string methods

String length
String slice()
String substring()
String substr()
String replace()
String replaceAll()
String toUpperCase()
String toLowerCase()
String concat()
String trim()
String trimStart()
String trimEnd()
String padStart()
String padEnd()
String charAt()
String charCodeAt()
String split()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors