Reputation: 21
why do i get a syntax error from the console ? it is telling me that the secondInteger has already been declared but i declared it just once
function performOperation(secondInteger, secondDecimal, secondString) {
const firstInteger = 4;
const firstDecimal = 4.0;
const firstString = "HackerRank "
const secondInteger=5;
const secondDecimal=2.0;
const secondString="hacking rank";
console.log(firstInteger+ secondInteger);
console.log(firstDecimal+secondDecimal);
console.log(firstString+secondString);}
Upvotes: 0
Views: 49
Reputation: 943625
Argument names are variable declarations so you declare it twice.
const
Upvotes: 3