And here is an arrow function in JavaScript:
const greet = (name) => { console.log(`Hello, ${name}!`); }
Here is how you might define a class in Ruby:
class Greeter def initialize(name) @name = name end def say_hi puts "Hi !" end end