aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • technology Online Quiz - 1812
  • var test = "Hello world" what will test.substring(3,7) re...
Multiple choice technology enterprise content management

var test = "Hello world" what will test.substring(3,7) result in

  1. index out of range error during compilation

  2. lo w

  3. llo w

  4. lo wo

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The substring(start, end) method extracts characters from index start up to, but not including, index end. For "Hello world", index 3 is 'l' and index 7 is 'o', yielding "lo w".

Keep practicing — related questions

  • var test = 'Hello World' what will test.slice(3,-1) result in.
  • String s = “Welcome To Java” s.substring(4 , 3 ); What will be the result of the above code?
  • String s = “Welcome To Java” s.substring(4, 3 ); What will be the result of the above code?
  • What will be the result of the above code? String s = �Welcome To Java� s.substring(4 , 3 );
  • String s = “Welcome To Java” s.substring(4 , 4 ); What will be the outcome of the given code?
  • What is the output for the below lines of code? var main_string = "JavaScript is the best Web Programming l...
  • What will be the output of the given code? String s = “Welcome To Java” s.substring(4, 4);
  • String s = “Welcome To Java” s.substring(4, 4 ); What will be the answer of the given code?
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy