What is the type of typeof in JS

aaadryyy

In my console's browser, when I do :

console.log(typeof(typeof))

it returns an error Uncaught SyntaxError: Unexpected token ')'

Why is that? Why can't I get typeof's type ?

Quentin

typeof is an operator like &&, =, ==, or !.

It isn't a value, variable or identifier.


As with any operator, when you apply it you get a value, and typeof something will give you a string. (Just as something == somethingelse will give you a boolean).

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Type Checking: typeof, GetType, or is?

分類Dev

TypeScript '...' does not exist on type 'typeof ...'

分類Dev

Using a generic type argument with `typeof T`

分類Dev

Using a generic type argument with `typeof T`

分類Dev

typescript does not exist on type 'typeof object

分類Dev

Return type based on typeof parameter value

分類Dev

instanceof contradicts the object type returned by typeof method

分類Dev

What is this type?

分類Dev

Angular 6 : Property 'fromEvent' does not exist on type 'typeof Observable'

分類Dev

What are some examples of code that rely on 'typeof null' returning an object?

分類Dev

argument of type read: typeof elementref is not assignable to parameter of type property static is missing in type

分類Dev

what is the difference extends type and type

分類Dev

What is the type of the logical operators?

分類Dev

What type is an array?

分類Dev

What is the "<Module>" type?

分類Dev

In Typescript, what is the type of module?

分類Dev

What is the data type for barcodes?

分類Dev

What is type '()' in swift?

分類Dev

What will be the type for eventdata in typescript

分類Dev

What type of password is this?

分類Dev

What exactly is a MIME type

分類Dev

Scheme: What type is read?

分類Dev

Linq .Where(type = typeof(xxx))の比較は常にfalse

分類Dev

リーフレットProperty-Routing-does-not-exist-on-type-typeof-import

分類Dev

JSのtypeofエラーをチェックする

分類Dev

JSでbabel変換演算子「typeof」を防ぐ方法

分類Dev

JSでtypeof演算子を正しく使用していますか?

分類Dev

is vs typeof

分類Dev

is vs typeof

Related 関連記事

ホットタグ

アーカイブ