Question 64Asked in Bihar STET 2024 Paper II Computer Science, 11 Jun 2024, Shift 1 (10:00 AM)

Which of the following is a valid JavaScript variable name?निम्नलिखित में से कौन सा एक मान्य जावास्क्रिप्ट चर नाम है?

निम्नलिखित में से कौन सा एक मान्य जावास्क्रिप्ट चर नाम है?
  1. A123variable123 चर
  2. B_variable123_variable123
  3. Cvariable nameचर नाम
  4. D#variable#variable
Show answerHide answer

Correct answer: (B) _variable123_variable123

Explanation

JavaScript identifiers may start with a letter, _ or $ and cannot start with a digit or contain spaces or #, so _variable123 is valid.JavaScript identifier किसी अक्षर, _ या $ से शुरू हो सकते हैं, पर अंक से शुरू नहीं हो सकते और उनमें space या # नहीं हो सकता, इसलिए _variable123 मान्य है।

From Bihar STET 2024 Paper II Computer Science PYQ, 11 Jun 2024, Shift 1 (10:00 AM)

This is question 64 of Bihar STET 2024 Paper II Computer Science PYQ, 11 Jun 2024, Shift 1 (10:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.