PLAY READ BLOG

Assess your experience with Javascript

I estimate it would take you 43 steps in 11 minutes to Assess your experience with Javascript.
Which of the following is true about variable naming conventions in JavaScript?
  • Cannot use Javascript reserved words as variables
  • JavaScript variable names should not start with a numeral [0-9]
  • Both of the above
  • None of the above
Which of the following is true about cookie handling in JavaScript?
  • Can manipulate cookies using the cookie property of Document object
  • Can read, create, modify, and delete the cookie or cookies
  • Both of the above
  • None of the above
Which built-in method calls a function for each element in the array?
  • while()
  • loop()
  • forEach()
  • None of the above
Which built-in method returns the calling string value converted to upper case?
  • toUpperCase()
  • toUpper()
  • changeCase()
  • None of the above.
Which of the following function of Boolean object returns a string containing the source
  • toSource()
  • valueOf()
  • toString()
  • None of the above.
Which of the following function of String object returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order?
  • localeCompare()
  • search()
  • substr()
  • concat()
Which of the following function of String object returns the calling string value converted to lower case?
  • toLocaleLowerCase()
  • toLowerCase()
  • toString()
  • substring()
Which of the following function of String object causes a string to be displayed as a superscript, as if it were in a <sup> tag?
  • sup()
  • small()
  • strike()
  • sub()
Which of the following function of Array object creates a new array with all of the elements of this array for which the provided filtering function returns true?
  • concat()
  • every()
  • filter()
  • some()
Which function returns a string representing the array and its elements?
  • toSource()
  • sort()
  • splice()
  • toString()
What's the output of:

var foo = function foo() {
console.log(foo === foo);
};

foo();
  • True
  • False
  • ReferenceError
💡FUN FACT 💡Although there are similarities between JavaScript and Java, including language name, syntax, and respective standard libraries, the two languages are distinct and differ greatly in design. JavaScript was influenced by programming languages such as Self and Scheme
What is alerted?
function bar() {
return foo;
foo = 10;
function foo() {}
var foo = '11';
}
alert(typeof bar());
  • number
  • function
  • undefined
  • string
What is the order of values alerted by the following code?
var x = 3;

var foo = {
x: 2,
baz: {
x: 1,
bar: function() {
return this.x;
}}}

var go = foo.baz.bar;

alert(go());
alert(foo.baz.bar());
  • 1,2
  • 1,3
  • 2,1
  • 3,1
What is the output of:

(true + false)>2 + true;
  • true
  • false
  • TypeError
  • NaN
What is the result?

"1" - - "1";
  • 0
  • 11
  • "11"
  • 2
What is the result?

Number("1") - 1 == 0;
  • false
  • TypeError
  • true
What is the result?

new String("This is a string")
instanceof String;
  • false
  • TypeError
  • true
What is printed in the console?

String('Hello') === 'Hello';
  • true
  • false
  • TypeError
What does the code below alert?

function aaa() {
return
{
test: 1
};
}

alert(typeof aaa());
  • function
  • number
  • undefined
What's the result of the following code?

new Array(5).toString();
  • []
  • "[]"
  • ",,,,"
96% of all 265 users completed this intention.
Get Started   

Or consider 75 other intentions.