user9539919
user9539919

Reputation:

Use of window.hasOwnProperty()

I'm creating a speech recognition in html. I am taking help from labnol.org. While doing so, I faced a problem. I don't what is the use of window.hasOwnProperty('webkitSpeechRecognition'). Can anyone please tell me what is its use.

Upvotes: 0

Views: 472

Answers (1)

Derek 朕會功夫
Derek 朕會功夫

Reputation: 94319

It is checking whether window (the global object) has a property called webkitSpeechRecognition, i.e. is Webkit Speech Recognition supported.

Upvotes: 2

Related Questions