×

Welcome to TagMyCode

Please login or create account to add a snippet.
2
0
 
1
Language: Javascript
Posted by: Paul Allies Allies
Added: Aug 27, 2012 6:52 PM
Modified: Dec 18, 2013 7:35 AM
Views: 154
Tags: javascript
Five types of placeholders are available:

%s converts the argument to a String value
%d converts the argument to a double value
%i converts the argument to a integer value
%f converts the argument to a floating point number
%o converts the argument to an Object
  1. /*
  2. Five types of placeholders are available:
  3.  
  4. %s - String.
  5. %d - Number (both integer and float).
  6.  
  7. */
  8. console.log("my name is %s", "Paul");

1 comment

Jing Tai Piao 4 years ago
Is it necessary to use a placeholder in console.log function coz javascript completely ignore the variable type.

Write a comment