attr

get given attribute, if it exists


Parameters

attr name :string :literal

Returns

  • :null
  • :any

Examples

copy
multiply: function [x][ if? attr? "with" [ x * attr "with" ] else [ 2*x ] ] print multiply 5 ; 10 print multiply.with: 6 5 ; 60

Related