Skip to content

Commit

Permalink
Merge pull request #2078 from perl6/rasch-node-what
Browse files Browse the repository at this point in the history
Change use of WHAT to ^name
  • Loading branch information
rafaelschipiura committed May 29, 2018
2 parents de6693e + eb9e59a commit 5f2d0df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/Language/js-nutshell.pod6
Expand Up @@ -257,15 +257,15 @@ say $str; # def
=end code
While we are talking about C<instanceof>, the equivalent to C<typeof> or the
C<constructor> property on Node.js objects in Perl 6 is the C<WHAT> attribute:
C<constructor> property on Node.js objects in Perl 6 is the C<^name> meta-attribute:
=begin code :lang<javascript>
console.log(typeof 'foo'); // string
console.log('foo'.constructor); // String
=end code
=begin code :ok-test<WHAT>
say 'foo'.WHAT; # (Str)
=begin code
say 'foo'.^name; # Str
=end code
=head3 Numeric
Expand Down

0 comments on commit 5f2d0df

Please sign in to comment.