'Number' Question

Here is the code:

const robot = {

_model: ‘1E78V2’,

_energyLevel: 100,

_numOfSensors: 15,

get numOfSensors(){

if(typeof this._numOfSensors === 'number'){

  return this._numOfSensors;

} else {

  return 'Sensors are currently down.'



set numOfSensors(num){

if (typeof num === ‘number’ && num >= 0){

 this._numOfSensors = num; 




My question is regarding the string ‘number’. This is a string . Shouldn;t is be number instead of ‘number’? If the key/property = ‘number’?

I assume you’re referring to this line?

typeof returns a string based on the the type of the object passed in. You can read more about it here