Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Mars Exploration problem in js

Please refer this link for problem statement click here
 


    function marsExploration(message) {
        let sos = "SOS";
        let count = 0;
        for (let i = 0; i < message.length; i++) {
            if (message.charAt(i) != sos.charAt(i % 3)) count++;
        }
        return count;
    }
Comment

PREVIOUS NEXT
Code Example
Javascript :: mongodb data types 
Javascript :: use of .json() in javascript 
Javascript :: convert a new date standard to a yyy-mm-dd format in javascript 
Javascript :: pattern validator angular 
Javascript :: module is not defined eslint 
Javascript :: how to get all the voice channels in discord js 
Javascript :: react render component after data loaded 
Javascript :: how to normalize string in javascript 
Javascript :: jquery find 
Javascript :: kendo treeview get selected node data 
Javascript :: how to insert an item into an array at a specific index javascript 
Javascript :: set 404 handling via express in node 
Javascript :: remove part of string javascript 
Javascript :: discord.js checking channel permissions 
Javascript :: gesture handling with react native expo 
Javascript :: async await javascript stack overflow 
Javascript :: datatables server side 
Javascript :: field array using useFormik 
Javascript :: how to see node taints 
Javascript :: how to repeat an array of objects n times in javascript 
Javascript :: replace jquery 
Javascript :: check if an element is there in js 
Javascript :: timeout 
Javascript :: react native vector icons not showing 
Javascript :: turnery opertaor js 
Javascript :: puppeteer set download path 
Javascript :: axios cnd 
Javascript :: select element by id 
Javascript :: How to print somethign to the console with javascript 
Javascript :: cm to feet javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =