Guest User

Untitled

a guest
Dec 11th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. const obj = {
  2. foo: 'das',
  3. bar: 'few',
  4. baz: '',
  5. };
  6.  
  7. var x = ''; // I must assign the variable ''
  8.  
  9. if (obj[x] != '') {
  10. //do something
  11. }
  12.  
  13. Element implicitly has an 'any' type because type '{ foo: string; bar: string; baz: string; }' has no index signature.
Add Comment
Please, Sign In to add comment