Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Lesson 2 level 6 in JS Course

let str1 = `Studytonight`;
let str2 = String("Studytonight");

// write code here

console.log(str1);
console.log(str2);


error showing that "Assign value to variable str2"
by

2 Answers

iamabhishek
Try this one

let str1 = 'Studytonight';
let str2 = String(str1);
console.log(str1);
console.log(str2);
Ashutoshry6u3
let str1 = `Studytonight`;
let str2 = String(str1);
console.log(str1);
console.log(str2);

Login / Signup to Answer the Question.