attr

get given attribute, if it exists


Parameters

attr name :string :literal

Returns

  • :null
  • :any

Examples

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

Related