chinchang / chinchang/screenlog.js

String substitution for console.log

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
854
Forks
71
PR merge metrics
No merged PRs in 30d

Description

Typing `console.log("%s has %d points", "Sam", 100);`
outputs - `%s has %d points Sam 100`, (concatenation) on the page,
while the console outputs - `Sam has 100 points`
(It substitutes the values of `%s` & `%d` in the string).

[Reference link](https://developer.chrome.com/devtools/docs/console#string-substitution-and-formatting)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.