MCQs > IT & Programming > JavaScript > What's the output? var str1 = 'Hi world'; var str = 'Apples are round, and apples are juicy'; var sliced = str.slice(5, -2); var text =`Apple \nJuice` var raw_text = String.raw`Apple \nJuice` console.log(str1.valueOf()); console.log(raw_text) console.log(sliced); console.log(text)

JavaScript MCQs

What will be the output of the following JavaScript code?

var str1 = "Hi world";
var str = "Apples are round, and apples are juicy";
var sliced = str.slice(5, -2);
var text =`Apple \nJuice`
var raw_text = String.raw`Apple \nJuice`
console.log(str1.valueOf());
console.log(raw_text)
console.log(sliced);
console.log(text)


Answer

Correct Answer: Hi world<br>Apple \nJuice<br>s are round, and apples are jui<br>Apple<br>Juice

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it