Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. (function() {
  2. "use strict";
  3. document.getElementById("demo").innerHTML = "Paragraph changed.";
  4. function keywordusage(text, keywords) {
  5. var text = 'Dive Into Python is a free book for experienced programmers';
  6. var keywords = ['Python', 'python', 'scala'];
  7. var textNoSpaces = text.split(" ");
  8. var x = [];
  9. for(var i in keywords) {
  10. if (i in textNoSpaces) {
  11. x.push("true");
  12. } else{
  13. x.push("false");
  14. }
  15. return x;
  16. }
  17. }
  18.  
  19. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement