3.
What is the value of the following JavaScript ES6 code:
'JavaScript'.startsWith('Java')?
Nothing, it causes an error
Java
false
true
Correct: D
In JavaScript ES6, String.prototype.startsWith() determines whether a string begins with the characters of a specified string, returning true or false as appropriate. Since 'JavaScript' does start with 'Java', this will return true.