Adding javascript from wpcodebox to a page block

What is the best way to add this code into a block on a page from wpcodebox?

Should I use the new shortcode option? or is there another preferred way to call it?