#!/usr/bin/ruby # -*- coding: utf-8 -*- =begin map을 사용해 배열의 제곱값 배열 생성 =end array = [2, 3, 5, 7, 9] puts array.map { |item| item ** 2 }