#!/usr/bin/env node; const Utils = require('./Utils'); const sprintf = require('sprintf-js').sprintf; const main = async () => { const a = 326; const b = -1; const c = 2015; const i1 = 65000; const i2 = -2; const i3 = 3261963; const f1 = 3.1415926; const f2 = 2.99792458e9; const f3 = 1.234e-4; const c1 = "A".codePointAt(0); const c2 = "B".codePointAt(0); const c3 = "C".codePointAt(0); const s1 = "Apples"; const s2 = "and"; const s3 = "Bananas"; const b1 = true; const b2 = false; let s; s = sprintf("Decimals: %d %d %d", a, b, c); console.log(s); s = sprintf("Long Decimals: %d %d %d", i1, i2, i3); console.log(s); s = sprintf("Fixed FP: %f %f %f", f1, f2, f3); console.log(s); s = sprintf("Boolean: %t %t", b1, b2); console.log(s); s = sprintf("Boolean: %s %s", b1, b2); console.log(s); s = sprintf("Character: %s %s %s", String.fromCodePoint(c1), String.fromCodePoint(c2), String.fromCodePoint(c3)); console.log(s); s = sprintf("String: %s %s %s", s1, s2, s3); console.log(s); } main().catch( e => { console.error(e) } );