Which values will be returned?

HOTSPOT
You are validating user input by using built-in JavaScript functions.
The application must:
Store the value that is entered in a variable named inputValue
Use the built-in isNaN(tnputValue) function to evaluate the data type
You need to validate the return value of the isNaN(inputValue) function.
Which values will be returned? (To answer, configure the appropriate options in the dialog
box in the answer area.)

HOTSPOT
You are validating user input by using built-in JavaScript functions.
The application must:
Store the value that is entered in a variable named inputValue
Use the built-in isNaN(tnputValue) function to evaluate the data type
You need to validate the return value of the isNaN(inputValue) function.
Which values will be returned? (To answer, configure the appropriate options in the dialog
box in the answer area.)

Answer:

Explanation:



Leave a Reply 17

Your email address will not be published. Required fields are marked *


mieke

mieke

Is this true as well? In the V3 they say they are all false

banshee

banshee

All those functions in firefox’s console return ‘false’.

Jose Carlos

Jose Carlos

Is correct:

isNaN(“-13”) = false
isNaN(“24.3”) = false
isNaN(“3*8”) = true
isNaN(“‘5′”) = true

Alex

Alex

OF course they are true if you add the quotes around the values. The question wasn’t about “3*8” but 3*8. The only value with the quotes is the last one, and they are present in the question. The last one returns false as well, according to w3schools http://www.w3schools.com/jsref/jsref_isnan.asp

Alex

Alex

But then again, reading the question more attentively we see that those values are user inputs, so of text type. I think that you are right, Jose

Alaeddin

Alaeddin

isNaN(“3*8”) = true
isNaN(“‘5′”) = true

there are false
test like this dont change them to string coz all string true;
isNaN(3*8) = true
isNaN(‘5′) = true

nex-54

nex-54

no, values comes from input control – it will be string

Alaeddin

Alaeddin

ِAll of them False

Fack

Fack

All of them False

Foor Manchu

Foor Manchu

Just passed 70-480 after 3 times!!! Passed with a score of 900!!!

Around 15%-18% new questions.

Pay close attention to questions on these points:
– about priority when there is multiple event (div inside div and each dive has a click event)
– css priority (div.class or #id wich give color)
– overflow horizontal or vertical

Dumps from this AIO site are not enough for 100% passing. I also learned the premium PL dumps (247Q) here: http://www.passleader.com/70-480.html (recommend!)

Robin

Robin

All false!

false: -13
false: 24.3
false: 3*8
false: ‘5’

Sergiu

Sergiu

Try this:

TestIsNaN

var testIsNaN = function() {
alert(document.getElementById(‘test’).value + ‘ is not a number: ‘ + isNaN(document.getElementById(‘test’).value));
}

So the provided answers are correct:
-13: false
24.3: false
3*8: true
‘5’: true

Sergiu

Sergiu

TestIsNaN

var testIsNaN = function() {
alert(document.getElementById(‘test’).value + ‘ is not a number: ‘ + isNaN(document.getElementById(‘test’).value));
}