#!/usr/bin/env js s = "Hello, world!"; for (var i=0; i<s.length; i++) { print(s.substr(0, i+1)); //substr=文字を取り出す。 }